Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: To Much space?

  1. #1
    New Coder
    Join Date
    Feb 2006
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    To Much space?

    hey guys, could someone help me out? if you look at www.visionstudios.be/pstuts.php there is to much space between "comments to date: xx" and the other words, how can i fix this? here the code;

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>
    <table width="550" height="88" border="0" cellpadding="2" cellspacing="0">
    <tr>
    <td width="80" align="center" valign="middle"><div align="center"><a href="http://www.visionstudios.be/tracker/tracker.php?id=1"><img src="images/tuts/diagonal/thumb.gif" width="48" height="48" border="0" align="top"></a></div></td>
    <td width="466" align="center" valign="middle"><div align="left">
    Difficutly: Easy<br>
    Time: 5 Minutes<br>
    Author: Cnelson<br>
    Description: Learn to make a nice diagonal pattern, and apply it to a image.<br>
    <?
    include ("tracker/connect.php");
    $result = mysql_query("SELECT * FROM links where id=1");
    while($row = mysql_fetch_array($result)) {
    print 'This tutorial has been viewed '.$row[visits].' times. ';
    }
    ?>
    <?
    $page_id = "2";
    include("comments/comments_show1.php");
    ?>

    </div></td>
    </tr>
    </table>
    </body>
    </html>

    thanks. cnelson.

  • #2
    New to the CF scene
    Join Date
    Feb 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That would be easier if you give us the php script in "tracker/connect.php" and "comments/comments_show1.php"

  • #3
    New Coder
    Join Date
    Feb 2006
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok, here we go;

    connect.php
    <?

    // Database configurations
    $host = "localhost"; //This is the ip of host where mySQL stands. Localhost for most cases.
    $dbuser = "**************"; //username database user
    $dbpass = "*******"; //password database user
    $dbname = "cnelson_tracker"; //name of database

    // Connecting to databse
    $conn = mysql_connect("$host","$dbuser","$dbpass") or die ("Cannot connect to Database");
    $db = mysql_select_db("$dbname") or die ("No Such Database found.");

    ?>

    (i've edited out the password and username.)

    and comments_show1.php;
    <?php

    include("comments-config.php");

    include("db_conn.php"); // connect to host and select db
    mysql_connect($host, $db_user, $db_pass);
    mysql_select_db($db_name);
    $db_table = "page_comments";

    // construct page query to find out how many matches
    $result=mysql_db_query($db_name,"select count(*) from $db_table where page_id='$page_id'");
    $count=mysql_result($result,0,"count(*)");

    // construct page query to find out how many matches
    $query = "SELECT * from $db_table WHERE page_id = '$page_id' ORDER by id DESC ";// what matches THIS page?
    $result = mysql_query($query);

    // skip output if no comments exist
    if (!$count)
    {
    echo "<p style='". $num_style. "'>No comments have been provided.</p>";
    }
    else
    {
    echo "<p style='". $num_style. "'>Comments to date: ". $count. "</p>";
    }

    and also comments_config.php;

    <?php

    // turn off ability to post comments on ANY page
    $commoff = "0"; // set to 1 to turn off comment form

    // your e-mail and domain name informationfor e-mails sent from the comments system
    $eaddr = "yeahi********@********"; // for comment post notification
    $domain = "www.visionstudios.be"; // for comment post notification
    $mail_on = 1; // 1 = provide post notification, 0 = disable post notification

    // avoid insignificant comments
    $useful = 6; // shortest acceptable comment length

    // include swear-checked posts to display (including baaaaad words)
    $swearban = 0; // set to 0 to include posts that fail swear checking

    // alternate row background colours for displayed comments
    $ro1 = "#f7f7f7"; // odd rows
    $ro2 = "#e0e0e0"; // even rows
    $space_color = "#000000"; // divider line colour between comments

    // CSS style applied to displayed comments
    $comm_style = "font-family: sans-serif; font-size:12 px; color: #000000; ";

    // CSS style applied to comments count line


    // NOTE: the comments input form takes its styles from those you provide for your own pages

    ?>

    (edited out my email so i don't get spammed)

    thanks. -cnelson.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •