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

Lua Website play now button error

Kthxbye

New Member
Joined
Jul 11, 2012
Messages
122
Reaction score
2
seal.png


This button instead of showing on just LatestNews page, Shows on every page, How can I fix this?

Layout.php

<PHP>
<div id='MenuBottom' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/box-bottom.gif);'></div>
</div>
<script type='text/javascript'>InitializePage();</script></div>
<div id="ContentColumn">
<div class="Content">
<div id="ContentHelper"><script type="text/javascript" src="<?PHP echo $layout_name; ?>/newsticker.js"></script>
<img id="Seal" src="<?PHP echo $layout_name; ?>/images/menu/seal.png" onClick="window.location = '?subtopic=createaccount';" alt="seal" />
<?PHP echo $news_content; ?>
<div id="<?PHP echo $subtopic; ?>" class="Box">
<div class="Corner-tl" style="background-image:url(<?PHP echo $layout_name; ?>/images/content/corner-tl.gif);"></div>
<div class="Corner-tr" style="background-image:url(<?PHP echo $layout_name; ?>/images/content/corner-tr.gif);"></div>
<div class="Border_1" style="background-image:url(<?PHP echo $layout_name; ?>/images/content/border-1.gif);"></div>
<div class="BorderTitleText" style="background-image:url(<?PHP echo $layout_name; ?>/images/content/title-background-green.gif);"></div>
<img class="Title" src="<?PHP echo $layout_name; ?>/images/header/headline-<?PHP echo $subtopic; ?>.gif" alt="Contentbox headline" />
<div class="Border_2">
<div class="Border_3">
<div class="BoxContent" style="background-image:url(<?PHP echo $layout_name; ?>/images/content/scroll.gif);">
<?PHP echo $main_content; ?>
</div>
</div>
</div>
<div class="Border_1" style="background-image:url(<?PHP echo $layout_name; ?>/images/content/border-1.gif);"></div>
</PHP>
 
Last edited:
If you want to have it only on index/latest news page, add it into file responsible for that.
 
What AAC are you using?
Simple if you want to have shown that button only on latestnews page, then add it not in Layout.php, but in latestnews.php
 
If you want to have it on top, add it on top of the file after:
Code:
if(!defined('INITIALIZED'))
    exit;
If you are using Top Guilds, then add it before it, or after it.
Or if you want to have it at the bottom, add it on bottom of the file.
 
If you want to have it on top, add it on top of the file after:
Code:
if(!defined('INITIALIZED'))
    exit;
If you are using Top Guilds, then add it before it, or after it.
Or if you want to have it at the bottom, add it on bottom of the file.
I searched for that but couldn't find it. :/
 
Untitled.png
It's the first line of file :d
awzjxhcdwcmeedctlfmwcjkhryhhxsebgkguvsssdbpwhzizbobgekhqlsrzzvgeykytwixsmutatnzsphfjqxxvcqjdbssiukyx

Mine doesnt have that!
Code:
<?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>';
<?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>';</code>
 
Before:
Code:
// top kills - guilds
$main_content .= '<div class="NewsHeadline">
Add
Code:
 $main_content .= 'HERE PASTE YOUR BUTTON';
 
Before:
Code:
// top kills - guilds
$main_content .= '<div class="NewsHeadline">
Add
Code:
 $main_content .= 'HERE PASTE YOUR BUTTON';
Did n0t work.

<a href="?subtopic=createaccount">
<div id="Seal" style="background-image:url('layouts/tibiacom/images/menu/seal.png');"></div>
</a>


Post that there?
 
Code:
$main_content .= '<a href="?subtopic=createaccount">
<div id="Seal" style="background-image:url('layouts/tibiacom/images/menu/seal.png');"></div>
</a>';
Should look like this, and should work.
Also, give link to your web
 
Back
Top