Clan-uas.com v2.0b trubs, help needed

  • Hey - turns out IRC is out and something a little more modern has taken it's place... A little thing called Discord!

    Join our community @ https://discord.gg/JuaSzXBZrk for a pick-up game, or just to rekindle with fellow community members.

Fusion

New Member
Mar 13, 2002
411
0
Netherlands
As some uta members may already have noticed, I've started working on a new layout for the ]UAS[ site. At the moment I'm stuck with an irritating table problem and with Miner nowhere to be seen, I'm hoping that someone else could help me.

I stumbled on this small irritating problem which occured during the layout changing for our clansite. Below the flash banner i've made two seperate table's which will show the nextactions.php bit. The different backgrounds of those two tables are for the different gametypes the nextactions command is going to be used. Now everything worked fine, untill i went to news.php:

:thumb: http://www.clan-uas.com/member.php
:( http://www.clan-uas.com/news.php

tableproblem.jpg


For some reason, the table width below the flash banner changes as soon as i go to news.php. Any other page, member, calandar, downloads, etc, etc, the background is at its supposed to be. I've tried to find the problem, diving into the template code and changing the next.actions.php bit, but nothing helped.

Now there is something you need to know, the lastactions.php bit has been modified by Miner so that the number of signed up members for the war is shown (2/6) , with 2 the number of signed up members, 6 the total number of players needed.

<?php
@error_reporting(7);
/* #####################################################################################
*
* $Id: nextactions.php,v 1.2 2003/03/12 21:37:26 mabu Exp $
*
* This notice must remain untouched at all times.
*
* Modifications to the script, except the official addons or hacks,
* without the owners permission are prohibited.
* All rights reserved to their proper authors.
*
* Get the latest version at http://www.vwar.de - Copyright (C) 2001-2003
*
* #####################################################################################
*/

// configuration
$numnextactions = "2"; // limit display to x next actions
$pathtovwar = ""; // relative or absolute path to your vwar directory (with / at the end!)

// ################################### display nextactions ############################
include($pathtovwar."_config.inc.php");
require_once($pathtovwar."_class_db.php");
$db = new db($sql["hostname"],$sql["username"],$sql["password"],$sql["database"]);

$result = $db->query_first("SELECT ownnameshort,ownhomepage,waroverlap,longdateformat FROM vwar".$n."_settings");
$ownnameshort=$result['ownnameshort'];
$ownhomepage=$result['ownhomepage'];
$waroverlap=$result['waroverlap'];
$longdateformat=$result['longdateformat'];
?>
<style type="text/css">
<!--
.style1 {
font-size: 10px;
font-family: Tahoma, Arial, sans-serif;
}
.style2 {
font-size: 11px;
font-family: Tahoma, Arial, sans-serif;
color: #FFFFFF;
}
-->
</style>

<table width="242" border="0" align="center" cellpadding="0" cellspacing="0">
<?
$result=$db->query_first("SELECT COUNT(warid) FROM vwar".$n." WHERE status='0' AND dateline > '".time()."'");
$numnextwars=$result[0];
$db->free_result($result);

if($numnextwars > 0) {
$result=$db->query("
SELECT vwar".$n.".warid,vwar".$n.".gameid,vwar".$n.".gametypeid,vwar".$n.".matchtypeid,status,dateline,oppnameshort,oppircnetwork,oppircchannel,opphomepage,matchtypename,gametypename,vwar".$n."_games.gameicon,vwar".$n."_games.gamename
FROM vwar".$n.",vwar".$n."_matchtype,vwar".$n."_gametype,vwar".$n."_opponents,vwar".$n."_games
WHERE vwar".$n.".oppid=vwar".$n."_opponents.oppid
AND vwar".$n.".gametypeid=vwar".$n."_gametype.gametypeid
AND vwar".$n."_matchtype.matchtypeid=vwar".$n.".matchtypeid
AND status='0' AND dateline > '".(time()-($waroverlap*60))."'
AND vwar".$n.".gameid=vwar".$n."_games.gameid
ORDER BY dateline ASC
LIMIT 0,$numnextactions
");
while($row=$db->fetch_array($result)) {
if($row["gameicon"]!="" && file_exists($pathtovwar."images/icons/".$row["gameicon"]))
$gameicon="<img src=\"".$pathtovwar."images/icons/".$row["gameicon"]."\" alt=\"".$row["gamename"]."\" align=\"absmiddle\" border=\"0\">";
else
$gameicon="";
?>
<tr>
<td align="center">
<div align="left"><span class="style2">&nbsp;<?= date("dS M G:i",$row["dateline"]); ?>
&nbsp;
<a href="<?= $ownhomepage; ?>" target="blank"><b>
<?= $ownnameshort; ?>
</b></a><b> vs. <a href="<?= $row["opphomepage"]; ?>" target="blank">
<?= $row["oppnameshort"]; ?>
</a>
&nbsp;<a href="<?= $pathtovwar; ?>war.php?action=nextaction&formgame=<?= $row["gameid"]; ?>#<?= $row["warid"]; ?>">
<?php
// Miner's Hack for Getting Number of Players
$parts2=$db->query_first("
SELECT COUNT(partid)
FROM vwar".$n."_participants
WHERE warid='".$row["warid"]."'
AND available='1'");
$available=$parts2[0];
?><?="(".$available."/6)"; ?>
</a></b></span></div></td>
</tr>
<?
}
$db->free_result($result);
}
else
{
?>
<tr>
<td align="center">No Next Actions</td>
</tr>
<?
}
?>
</TABLE>

You guys are my only hope. Please....help me :\
 
k im a php n00b, so i wont try and help at that bit.

However, a few things,

+make some alts for the button on the top left of the banner, the pictures dont really tell me what they do

+your flash menu buttons are WAY too big and the diagonal line filter onmouseover looks a bit dodgy, especially because its on repeat. but the green light is lovely on repeat :D

+the gradient behind your visitor counter is the wrong way up. Should go from dark (top) to light (bottom) if its at the top of you menu content box. As the ones at the bottom of your menu content boxes go from light to dark.

Bloody nice site though, as a whole well done with it :thumb:
 
Joko said:
+make some alts for the button on the top left of the banner, the pictures dont really tell me what they do

True, will do

+your flash menu buttons are WAY too big and the diagonal line filter onmouseover looks a bit dodgy, especially because its on repeat. but the green light is lovely on repeat

Well, too bad, so sad. If I make them smaller, it wouldn't look so nice with the left gradient graphics. Dont worry, I plan to make give them a drop down menu so that other menu items which i had to slice will also be implemented.

+the gradient behind your visitor counter is the wrong way up. Should go from dark (top) to light (bottom) if its at the top of you menu content box. As the ones at the bottom of your menu content boxes go from light to dark.

Good idea, will do. Thnx for the head-ups. :thumb:
 
:eek: putting html stuff in the head is :eek:

the html source is 1 big mess imo and when you put html in the head (<head></head>) it's just asking for troubles :P

if i find sth i'll let you know :)
 
in the html source code on line 399 of news there's this line

<BODY><table cellspacing="0" cellpadding="0" width="93%" align="center" border="0">

changing the width to a fixed value seems to "fix" the problem but not sure if resizing goes right


<BODY><table cellspacing="0" cellpadding="0" width="560" align="center" border="0">
seems to show okishh

not sure where to look for it in vwar as i never used it before :)
 
Might it be an idea to give you the template without the vwar php script? The source you see now it both the template AND vwar.
 
the part i mentioned is below the <!---- Start of VWar ----> thingy.. tbh mate you really could've integrated this much better afaik . coz atm it's just 2 html pages in 1 lol