Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP Script won't stay inside container
Old 01-15-2008, 01:56 PM PHP Script won't stay inside container
Novice Talker

Posts: 8
Name: Jason
Trades: 0
Thanks for any help in advance. I am trying to get a php comments script to stay within a container or layer on my site but it just refuses to "play nice". I emailed the coder who wrote the script and asked him if I could just edit the code a bit and he is recommending changing the div to auto. So I set the main container to auto, and it just shrinks to 40 pixels. I need some help. Here is a link to the problem http://www.findasmokeshop.com/teststyle.php
finda is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-15-2008, 02:01 PM Re: PHP Script won't stay inside container
phpknowhow's Avatar
Skilled Talker

Posts: 83
Name: Colin
Location: USA
Trades: 0
Can you provide the php or html?
__________________

Please login or register to view this content. Registration is FREE
| Freelance PHP solutions for small to midsized projects |
Please login or register to view this content. Registration is FREE
phpknowhow is offline
Reply With Quote
View Public Profile Visit phpknowhow's homepage!
 
Old 01-15-2008, 02:16 PM Re: PHP Script won't stay inside container
Novice Talker

Posts: 8
Name: Jason
Trades: 0
sure do you want the comments script or the page code?
finda is offline
Reply With Quote
View Public Profile
 
Old 01-15-2008, 02:20 PM Re: PHP Script won't stay inside container
phpknowhow's Avatar
Skilled Talker

Posts: 83
Name: Colin
Location: USA
Trades: 0
Just post the stuff thats causing the problem, so we can take a look at what your talking about.
__________________

Please login or register to view this content. Registration is FREE
| Freelance PHP solutions for small to midsized projects |
Please login or register to view this content. Registration is FREE
phpknowhow is offline
Reply With Quote
View Public Profile Visit phpknowhow's homepage!
 
Old 01-15-2008, 02:24 PM Re: PHP Script won't stay inside container
Novice Talker

Posts: 8
Name: Jason
Trades: 0
here is the php script

<?php
error_reporting(E_ALL ^ E_NOTICE);
$_SERVER['REQUEST_URI'] =
(isset($_SERVER['REQUEST_URI']) ?
$_SERVER ['REQUEST_URI'] :
$_SERVER['SCRIPT_NAME'] . (isset($_SERVER['QUERY_STRING']) ?
'?' . $_SERVER['QUERY_STRING'] :
'')
);
require('settings.php');
if (get_magic_quotes_gpc() == 1){
$_POST = stripslashes_accordingly($_POST);
$_GET = stripslashes_accordingly($_GET);
$_COOKIE = stripslashes_accordingly($_COOKIE);
}
define('NOLIMIT', 0);
define('ASC', 1);
define('DESC', 2);

class Database {
var $fileHandle;
var $contents;
var $filename;
var $nextAutoindex = 0;
/**
* Opens up the flat-file database. If it doesn't already exist,
* it is created.
* @param string $filename The path to the database to be opened or created.
*/
function Database($filename){
$this->filename = $filename;
$this->contents = file_exists($filename) ? file_get_contents($filename) : '';
$this->nextAutoindex = 0;
if ($this->contents != ''){
$lines = explode("\n", $this->contents);
for ($i = count($lines) - 1; $i >= 0; $i--){
if (trim($lines[$i]) == '') continue;
$parts = explode('|', $lines[$i]);
if (is_numeric($parts[0])){
$this->nextAutoindex = $parts[0] + 1;
break;
}
}
}
}
/**
* Returns an array of the comments for the current page. If $limit is
* omitted, all of the comments are returned.
* @param integer $sortDirection A value that controls how the entries are sorted. Use
* 1 to sort by date ascending or 2 to sort by date descending.
* @param integer $limit The number of entries to return.
*
*/

function GetComments($sortdirection = ASC, $limit = NOLIMIT){
$lines = explode("\n", $this->contents);
if ($sortdirection == DESC) $lines = array_reverse($lines);
$comments = array();
for ($i = 0; $i < count($lines); $i++){
$line = trim($lines[$i]);
if ($line == '') continue;
$comments[] = Comment::FromLine($line);
}
return $comments;
}
/**
* Adds a comment to the page's comment database.
* @param object $comment An instance of the comment class to be added.
*/
function AddComment($comment){
global $email, $password;
$line = $this->nextAutoindex . '|' . $comment->ToLine();
$prefix = $this->contents == '' ? '' : "\n";
$this->contents .= $prefix . $line;
if ($email != ''){
$vars = 'tntid='.$this->nextAutoindex.'&tntaction=delete&tntauth=' . md5(md5($password).'93ziJ'.$email);
$deleteurl = makeurl('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], $vars, '&');
$message =
'Hello,' . "\n\n" .
'A comment has just been posted on your website.' . "\n\n" .
'- Page URL: ' . 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . "\n" .
'- Comment: "' . str_replace('<br />',' ', $comment->message) . '"' . "\n" .
'- Author Email Address: ' . $comment->authorEmail . "\n" .
'- Author Name: ' . $comment->authorName . "\n" .
'- IP Address: ' . $_SERVER['REMOTE_ADDR'] . "\n\n" .
'If you want to delete the comment, go to the URL below:' . "\n" . $deleteurl;
$message = wordwrap($message, 70);
$headers = 'From: comments_' . $email;
@mail($email, 'Comment Posted on your Website', html_entity_decode($message), $headers);
}
$this->nextAutoindex++;
}
/**
* Updates the contents variable with the data from the $comment
* parameter. Don't forget to call the commit() function after calling
* this one.
*/
function SaveComment($comment){
$newlines = array();
$lines = explode("\n", $this->contents);
for ($i = 0; $i < count($lines); $i++){
if (trim($lines[$i]) == '') continue;
if (substr($lines[$i], 0, strpos($lines[$i], '|')) == $comment->id){
$newlines[] = $comment->id . '|' . $comment->ToLine();
}else{
$newlines[] = $lines[$i];
}
}
$this->contents = implode("\n", $newlines);
}
/**
* Removes a comment from the page's database.
* @param integer $commentid The id of the comment to be deleted.
*/
function DeleteComment($commentid){
$newlines = array();
$lines = explode("\n", $this->contents);
for ($i = 0; $i < count($lines); $i++){
if (trim($lines[$i]) == '') continue;
if (substr($lines[$i], 0, strpos($lines[$i], '|')) == $commentid) continue;
$newlines[] = $lines[$i];
}
$this->contents = implode("\n", $newlines);
}
/**
* Saves the changes that have been made to the database
* to the database file.
*/
function Commit(){
if (file_exists($this->filename)) @chmod($this->filename, 0777);
$this->fileHandle = fopen($this->filename, 'w');
fwrite($this->fileHandle, $this->contents);
fclose($this->fileHandle);
}
}

// this is a function that will break the long words but will maintain any existent tags inside it (like a link)
if (!function_exists("tag_keeping_wordwrap")) {
function tag_keeping_wordwrap($str,$cols,$cut) {
$len=strlen($str);
$tag=0;
for ($i=0;$i<$len;$i++) {
$chr = substr($str,$i,1);
if ($chr=="<")
$tag++;
elseif ($chr==">")
$tag--;
elseif (!$tag && $chr==" ")
$wordlen=0;
elseif (!$tag)
$wordlen++;
if (!$tag && !($wordlen%$cols))
$chr .= $cut;
$result .= $chr;
}
return $result;
}
}

class Comment {
var $isComment = true;
/** The text of the message that was posted. **/
var $message;
/** The Unix timestamp of the time the comment was posted. **/
var $timestamp;
/** The email address of the person who posted the file. **/
var $authorEmail;
/** The name of the person who posted the comment. **/
var $authorName;
/** The index of the comment in the database. **/
var $id;
/**
* Returns an instance of the Comment class from a
* line containing the comment data.
*/
function FromLine($line){
global $isadmin, $max_word_length, $filter_words, $bad_words,$filter_html_tags,$censor_replacement;
$line = trim($line);
$split = explode('|',$line);
$comment = new Comment();
$comment->id = $split[0];
$comment->message = decode_field($split[4]);

// filter html tags
if ($filter_html_tags == 1){
$comment->message = strip_tags(html_entity_decode($comment->message),'<br>');
} else {
$comment->message = html_entity_decode($comment->message);
}

// break the long words into smaller words according to user settings
$comment->message = tag_keeping_wordwrap($comment->message, $max_word_length, " ");
//

$comment->message = nl2br($comment->message);
// filter for bad words
if ($filter_words == 1){
$comment->message = str_replace($bad_words, $censor_replacement, $comment->message);
}

//
//
$comment->timestamp = $split[1];
$comment->authorEmail = decode_field($split[3]);
$comment->authorName = decode_field($split[2]);
return $comment;
}
/**
* Returns an instance of the Comment class from the
* data in the $_POST array.
* @return mixed Returns an instance of the Comment class on success,
* an array of errors on failure, and null when a comment
* was not attempted to be posted.
*/
function FromPostData(){
global $minimumMessageLength, $maximumMessageLength, $require_email, $use_verification_image;
if ($_POST['posted'] != 'true') return null;
$errors = array();
if ($_POST['authorname'] == null){
$errors[] = 'The name field was blank.';
}else if(strlen($_POST['authorname']) <= 1){
$errors[] = 'You must provide your name.';
}
$messageLength = @strlen($_POST['message']);
if ($_POST['message'] == null){
$errors[] = 'The message field was blank.';
}else if($messageLength < $minimumMessageLength){
$errors[] = 'Your message is too short. It must be greater than ' . ($minimumMessageLength - 1) .
' character(s) in length.';
}else if($messageLength > $maximumMessageLength){
$errors[] = 'Your message is too long. It must be less than ' . ($maximumMessageLength - 1) .
' characters in length.';
}
if ($require_email){
if (!Validator::IsEmail($_POST['email'])){
$errors[] = 'Invalid email address.';
}
}
if ($use_verification_image){
if (md5(md5($_POST['verification']) . '4a39nx') != $_COOKIE['tntcommentvf']){
$errors[] = 'Invalid verification code.';
}
}
if (count($errors) != 0) return $errors;

//$sanitizedMessage = htmlentities(trim($_POST['message']));
// this is fix for special chars like arabic language, above is replaced with:
$sanitizedMessage = htmlspecialchars(trim($_POST['message']), ENT_QUOTES, "UTF-8");

$sanitizedMessage = preg_replace('/((\r|\n)+)/','<br />',$sanitizedMessage);
$comment = new Comment();
$comment->authorEmail = $require_email ? trim($_POST['email']) : 'none';
$comment->authorName = trim($_POST['authorname']);
$comment->timestamp = mktime();
$comment->message = $sanitizedMessage;
return $comment;
}
/**
* Converts the data contained in the class to a string
* for storage.
* @return string A line safe for storage in the database.
*/
function ToLine(){
$line =
$this->timestamp . '|' .
encode_field($this->authorName) . '|' .
encode_field($this->authorEmail) . '|' .
encode_field($this->message);
return $line;
}
}
class Validator {
/**
* Returns true if the input is a valid email address.
* Otherwise, it returns false.
*/
function IsEmail($input){
if (!is_string($input)) return false;
$test = trim($input);
$regex = '^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$';
return (eregi($regex,$test) === false) ? false : true;
}
}
/** Prepares a field for entry in the database. **/
function encode_field($fieldData){
$charsToEncode = array('|');
foreach ($charsToEncode as $char){
$fieldData = str_replace($char, '&0x'.ord($char).';', $fieldData);
}
return $fieldData;
}
/** Decodes a field right from the database. */
function decode_field($fieldData){
$charsToDecode = array('|');
foreach ($charsToDecode as $char){
$fieldData = str_replace('&0x'.ord($char).';', $char, $fieldData);
}
return $fieldData;
}
function makeurl($base, $vars, $ampchar = '&amp;'){
if (strpos($base, '?') === false){
return $base . '?' . $vars;
}
return $base . $ampchar . $vars;
}

function timedifference($timestamp){
$difference = abs(mktime() - $timestamp);
if ($difference < 60){
return $difference . ' seconds';
}else if($difference < 60*60){
$num = round($difference / 60);
return $num . ' minute' . ($num == 1 ? '' : 's');
}else if($difference < 60*60*24){
$num = round($difference / 60 / 60);
return $num . ' hour' . ($num == 1 ? '' : 's');
}else if($difference < 60*60*24*2){
return 'Yesterday';
}else{
return round($difference / 60 / 60 / 24) . ' days';
}
}
function timeago($timestamp){
$diff = timedifference($timestamp);
return $diff . ($diff != 'Yesterday' ? ' ago' : '');
}
function endswith($search, $base){
if (strlen($base)-strlen($search)<0) return false;
return strtolower(substr($base, strlen($base)-strlen($search))) == strtolower($search);
}
/**
* To be called ONLY if get_magic_quotes_gpc() == 1. This function
* remove strips the slashes of all elements of the array.. even if
* it is multidimensional.
*/
function stripslashes_accordingly($input){
if (is_array($input)){
foreach ($input as $key => $value){
$data[$key] = stripslashes_accordingly($value);
}
return $data;
}else{
return stripslashes($input);
}
}
$registeredPageVars = explode(',', $pageGetVars);
$uriWithVars = $_SERVER['REQUEST_URI'];
$qMarkPos = strrpos($uriWithVars, '?');
if ($qMarkPos !== false){
$uriWithVars = substr($uriWithVars, 0, $qMarkPos);
}
$varArray = array(); $i = 0;
if (is_array($_GET)){
foreach ($_GET as $key => $val){
if(in_array($key, $registeredPageVars)){
if ($i == 0) $uriWithVars .= '?';
$varArray[] = $key . '=' . $val;
$i++;
}
}
}
$uriWithVars .= implode('&', $varArray);
$postLocation = $uriWithVars;
$dirDelimiter = strpos(__FILE__, '/') === false ? '\\' : '/';
$dbDirectory = str_replace(strpos(__FILE__, '/') === false ? '/' : '\\', $dirDelimiter, $dbDirectory);
$fileBase = '';
if (!isset($comment_id)){
$fileBase = $uriWithVars;
if (endswith('/',$fileBase)) $fileBase .= '_index_';
$fileBase = str_replace('/', '_', $fileBase);
$fileBase = str_replace('\\', '_', $fileBase);
$fileBase = str_replace('?', ';', $fileBase);
$fileBase = str_replace('&', '.', $fileBase);
if (endswith('index.html',$fileBase)) $fileBase = substr($fileBase,0,strlen($fileBase)-strlen('index.html')) . '_index_';
else if (endswith('index.php',$fileBase)) $fileBase = substr($fileBase,0,strlen($fileBase)-strlen('index.php')) . '_index_';
else if (endswith('index.php4',$fileBase)) $fileBase = substr($fileBase,0,strlen($fileBase)-strlen('index.php4')) . '_index_';
else if (endswith('index.php5',$fileBase)) $fileBase = substr($fileBase,0,strlen($fileBase)-strlen('index.php5')) . '_index_';
else if (endswith('index.shtml',$fileBase)) $fileBase = substr($fileBase,0,strlen($fileBase)-strlen('index.shtml')) . '_index_';
if ($fileBase == '') $fileBase = '_index_';
}else{
$fileBase = basename($comment_id);
}
$dbFile = dirname(__FILE__) . $dirDelimiter . $dbDirectory . $fileBase . '.dat';
@chmod(dirname(__FILE__) . $dirDelimiter . $dbDirectory, 0777);
$isadmin = false;
if ($_COOKIE['tntcommentsysusername'] === $username &&
$_COOKIE['tntcommentsyspassword'] === md5($password)){
$isadmin = true;
}
$db = new Database($dbFile);
$addedComment = Comment::FromPostData();
if ($addedComment->isComment == true){
$db->AddComment($addedComment);
$db->Commit();
$commentAdded = true;
}
if ($_POST['tntactiontype'] == 'inlineEditor'){
$message = $_POST['tntnewMessage'];
$commentId = $_POST['tntcommentid'];
$comments = $db->GetComments();
foreach ($comments as $comment){
if ($comment->id == $commentId){
$constructedComment = $comment;
break;
}
}
if ($constructedComment != null){
$sanitizedMessage = htmlentities(trim($message));
$sanitizedMessage = preg_replace('/((\r|\n)+)/','<br />',$sanitizedMessage);
$constructedComment->message = $sanitizedMessage;
$db->SaveComment($constructedComment);
$db->Commit();
$commentEdited = true;
}
}
if (($isadmin && $_GET['tntaction'] == 'delete' && is_numeric($_GET['tntid'])) ||
($_GET['tntauth'] == md5(md5($password).'93ziJ'.$email) && $_GET['tntaction'] == 'delete' && is_numeric($_GET['tntid']))){
$db->DeleteComment($_GET['tntid']);
$db->Commit();
$commentDeleted = true;
}
$comments = $db->GetComments(strtolower($sorting) == 'desc' ? DESC : ASC);
$areComments = count($comments) > 0;
$noComments = !$areComments;

$post_name = htmlentities($_POST['authorname']);
$post_email = htmlentities($_POST['email']);
//$post_message = htmlentities($_POST['message']);
// this is fix for special chars like arabic language, above is replaced with:
$post_message = htmlspecialchars($_POST['message'], ENT_QUOTES, "UTF-8");

if (trim($scriptpath) == ''){
$cleanedRequestURI = $uriWithVars;
$qmarkpos = strpos($cleanedRequestURI, '?');
if ($qmarkpos !== false){
$cleanedRequestURI = substr($cleanedRequestURI, 0, $qmarkpos);
}
$slashpos = strrpos($cleanedRequestURI, '/');
if ($slashpos !== false){
$cleanedRequestURI = substr($cleanedRequestURI, 0, $slashpos + 1);
}
$thisDir = dirname(__FILE__) . $dirDelimiter;
$base = substr($thisDir, strlen($_SERVER['DOCUMENT_ROOT']));
$base = str_replace('\\','/', $base);
$commentsystemfolder = 'http://' . $_SERVER['HTTP_HOST'] . $base;
}else{
$commentsystemfolder = $scriptpath;
}
include('comments_html.php');
?>
finda is offline
Reply With Quote
View Public Profile
 
Old 01-15-2008, 02:28 PM Re: PHP Script won't stay inside container
Novice Talker

Posts: 8
Name: Jason
Trades: 0
here is the my page, without the style sheet created. absolute, which i know i will get flammed for!


<!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" />
<meta name="generator" content="Adobe GoLive" />
<title>Untitled Page</title>
<link href="(EmptyReference!)" rel="stylesheet" type="text/css" media="all" />
<link href="http://findasmokeshop.com/style.css" rel="stylesheet" type="text/css" />
<style type="text/css" media="all"><!--
body { background-color: #f3f3be; }
#layer1 {
background-color: #fff;
background-position: center 50%;
position: absolute;
top: 207px;
left: 393px;
width: 213px;
height: 16px;
}
#Layer2 {
position:absolute;
width:162px;
height:254px;
z-index:2;
left: 3px;
top: 221px;
}
#Leftnavigationbox {
position: absolute;
top: 206px;
left: 17px;
width: 200px;
height: 754px;
background-color: #FFFFFF;
}
#mainbodycontainer {
background-color: #ffffff;
background-position: center 50%;
width: 1024px;
height: 1300px;
border: 0;
border-bottom: 1px;
border-bottom-color: #000000;
border-bottom-style: solid;
border-left: 1px;
border-left-color: #000000;
border-left-style: solid;
border-right: 1px;
border-right-color: #000000;
border-right-style: solid;
border-top: 1px;
border-top-color: #000000;
border-top-style: solid;
}
#Rightnavigationbox {
background-color: #FFFFFF;
position: absolute;
top: 206px;
left: 827px;
width: 202px;
height: auto;
}
#headercontainer { background-color: #fff; background-position: center 50%; width: 1024px; height: 104px; padding: 0; }
#layer2 { background-color: #86aed1; position: absolute; top: 280px; left: 270px; width: 500px; height: 250px; }
#Headerimage {
position:absolute;
width:1024px;
height:105px;
z-index:1;
left: 10px;
top: 37px;
}
#flashnavigation {
position:absolute;
width:1024px;
height:48;
z-index:2;
top: 142px;
}
#Layer4 {
position:absolute;
width:1024px;
height:19px;
z-index:3;
background-color: #86AED2;
left: -1px;
top: -22px;
}
#Layer5 {
position:absolute;
width:1024px;
height:18px;
z-index:4;
left: 11px;
top: 1023px;
background-color: #86AED2;
}
.style2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: small;
}
.style3 {font-size: x-small}
.style5 {font-family: arial}
.style6 {font-family: arial; font-size: 12px; }
.style7 {font-size: 12px}
.style8 {font-size: 12}
#Layer6 {
position:absolute;
width:500px;
height:261px;
z-index:5;
left: 274px;
top: 239px;
background-color: #86AED2;
background-image: url(images/index_mainimageeush.gif);
}
.style9 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style10 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; }
#Featureimage1 {
position:absolute;
width:547px;
height:261px;
z-index:3;
left: 244px;
top: 221px;
background-color: #86AED2;
padding-bottom: 5px;
padding-left: 5px;
padding-right: 5px;
padding-top: 5px;
}
#bottomfooter {
position:absolute;
width:1024px;
height:17px;
z-index:4;
left: 818px;
top: 1506px;
background-color: #86AED2;
}
#featuretoptext1 {
position:absolute;
width:532px;
height:261px;
z-index:1;
left: 6px;
top: 5px;
background-color: #F8F8F8;
padding-left: 5px;
padding-right: 5px;
}
.ds1 {
font-family: arial;
background-color: #FFFFFF;
}
.ds47 {color: #000; font-size: 12px; font-family: arial; }
#Headerimage {
position:absolute;
width:1024px;
height:91px;
z-index:5;
}
#Headertext {
position:absolute;
width:1020px;
height:17px;
z-index:6;
left: 13px;
top: 19px;
background-color: #86AED2;
}
.style12 {font-size: 12px; color: #000;}
#Layer1 {
position:absolute;
width:547px;
height:261px;
z-index:7;
left: 244px;
top: 512px;
background-color: #86AED2;
padding-bottom: 5px;
padding-left: 5px;
padding-right: 5px;
padding-top: 5px;
}
#Layer3 {
position:absolute;
width:276px;
height:261px;
z-index:1;
left: 815px;
top: 35px;
padding-bottom: 0px;
padding-left: 5px;
padding-right: 5px;
padding-top: 0px;
background-color: #F8F8F8;
}
.style13 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #FFFFFF;
}
#Layer7 {
position:absolute;
width:547px;
height:720px;
z-index:8;
left: 244px;
top: 499px;
padding-bottom: 5px;
padding-left: 5px;
padding-right: 5px;
padding-top: 5px;
background-color: #86AED2;
}
.ds34 {color: #000; font-size: 12px; font-family: arial; font-weight: bold; }
#Layer9 {
position:absolute;
width:276px;
height:261px;
z-index:2;
left: 264px;
padding-left: 5px;
padding-right: 5px;
background-color: #F8F8F8;
}
#Layer10 {
position:absolute;
width:547px;
height:115px;
z-index:9;
left: 244px;
top: 1099px;
padding-bottom: 5px;
padding-left: 5px;
padding-right: 5px;
padding-top: 5px;
background-color: #86AED2;
}
#Layer11 {
position:absolute;
width:1020px;
height:16px;
z-index:10;
left: 14px;
top: 1291px;
background-color: #86AED2;
}
.style15 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFFFFF;
}
#Layer12 {
position:absolute;
width:537px;
height:103px;
z-index:11;
left: 249px;
top: 1105px;
background-color: #F8F8F8;
padding-left: 5px;
padding-right: 5px;
padding-top: 5px;
padding-bottom: 5px;
background-image: url(images/index_smokeshopfastback.gif);
}
.style16 {color: #000000}
#container1 { background-color: #f8f8f8; width: 547px; height: 718px; }
--></style>
<!-- saved from url=(0014)about:internet -->
<!-- The script to prevent blocking in IE and for other menu maintenance -->
<script src='http://f-source.com/support/ActiveContent3_2a.js' type='text/javascript'></script>
<!-- If you are testing the menu locally or want to speed up script loading, download the script, -->
<!-- save it in your directory and point to a local file instead of src='http://f-source.com... -->
<link href="scripts/tnt comments script/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="Rightnavigationbox">
<p align="center"><img src="images/index_navigationtopround.png" width="200" height="17" /><img src="images/index_smokeshopgalleryphotos.gif" alt="" height="82" width="200" border="0" /><span class="style5"><span class="style7"><span class="style8"><span class="style7"><strong><br />
<span class="style9"> Photo Gallery Quick Links</span></strong><span class="style9"><br />
<a title="Bongs Photo Gallery" href="http://findasmokeshop.com/forum/inde...=gallery;cat=1" target="_self">Pipes</a> | <a title="Bubbler Photo Gallery" href="http://findasmokeshop.com/forum/inde...=gallery;cat=2" target="_self">Bubblers</a> | <a title="Bongs Photo Gallery" href="http://findasmokeshop.com/forum/inde...=gallery;cat=3" target="_self">Bongs</a><br />
<a title="Sherlocks Photo Gallery" href="http://findasmokeshop.com/forum/inde...=gallery;cat=8" target="_self">Sherlocks</a> | <a title="Side Cars Photo Gallery" href="http://findasmokeshop.com/forum/inde...=gallery;cat=9" target="_self">Side Cars</a> | <a title="Vaporizer Photo Gallery" href="http://findasmokeshop.com/forum/inde...=gallery;cat=5" target="_self"></a><br />
<a title="Smokers Photo Gallery" href="http://findasmokeshop.com/forum/inde...=gallery;cat=6" target="_self">Smokers</a> | <a title="Smoke Shops Photo Gallery" href="http://findasmokeshop.com/forum/inde...=gallery;cat=7" target="_self">Smoke Shops<br />
</a></span></span></span></span></span><span class="style10"><br />
<img src="images/index_navigationtoproundbottom.png" width="200" height="17" /></span></p>
<p align="center"><img src="images/index_navigationtopround.png" width="200" height="17" /><img src="images/index_forum.gif" alt="" height="82" width="200" border="0" /><strong><br />
<span class="style10">Discussion Forum Links</span></strong><span class="style10"><br />
<a title="Forum, I Got Hooked Up!" href="http://findasmokeshop.com/forum/index.php?board=3.0" target="_self">I Got Hooked Up!</a><br />
<a title="Forum, DIY-MacGyver Skills" href="http://findasmokeshop.com/forum/index.php?board=7.0" target="_self">DIY- MacGyver Skills</a><br />
<a title="Forum, The Art Of Blowing Glass Pipes" href="http://findasmokeshop.com/forum/index.php?board=4.0" target="_self">The Art Of Blowing Glass</a></span><br />
<br />
<img src="images/index_navigationtoproundbottom.png" width="200" height="17" /></p>
<p align="center" class="style10"><img src="images/index_navigationtopround.png" width="200" height="17" /><img src="images/index_productreviewspocketbong.gif" alt="" height="82" width="200" border="0" /><strong><br />
Product Review</strong><br />
This week we look at the Pocket Bong; and ingenious portable smoking device<br />
<br />
<img src="images/index_navigationtoproundbottom.png" width="200" height="17" /></p>
<p align="center" class="style6"><span class="style10"><img src="images/index_navigationtopround.png" width="200" height="17" /><img src="images/index_articles.gif" alt="" height="82" width="200" border="0" /><br />
<strong> Articles</strong><br />
Pipes | Bubblers | Bongs<br />
Sherlocks | Side Cars | <br />
Smokers | Smoke Shops<br />
<br />
</span><img src="images/index_navigationtoproundbottom.png" width="200" height="17" /></p>
<p align="center" class="style6"><img src="images/index_navigationtopround.png" width="200" height="17" /><img src="images/index_streetteam.gif" alt="Join Our Street Team" width="200" height="82" /><br />
<span class="style9"><strong>Join Our Team</strong><br />
Help us promote the site! We always need more authors for article and story submissions</span></p>
<p align="center" class="style6"><img src="images/index_navigationtoproundbottom.png" width="200" height="17" /> </p>
</div>
<div id="Leftnavigationbox">
<p align="center"><img src="images/index_navigationtopround.png" width="200" height="17" /><br />
<img src="images/index_maplocal2.gif" alt="" height="82" width="200" border="0" /><span class="style2"><span class="style3"><span class="style5"><span class="style7"><span class="style9"><strong><br />
Find A Local Smoke Shop</strong><br />
Easy to use search tool with reviews, special offers, photos and directions via google maps<br />
</span></span></span></span></span><span class="style10"><br />
<img src="images/index_navigationtoproundbottom.png" width="200" height="17" /></span></p>
<p align="center"><img src="images/index_navigationtopround.png" width="200" height="17" /><br />
<img src="images/index_smokeshoplocatoronline.gif" alt="" height="82" width="200" border="0" /><strong><br />
<span class="style10">Find A Smoke Shop Online<br />
</span></strong><span class="style10">There are tons of smoke shops online, we make it easy to find the best, includes reviews!<br />
</span>
<br />
<img src="images/index_navigationtoproundbottom.png" width="200" height="17" /></p>
<p align="center" class="style10"><img src="images/index_navigationtopround.png" width="200" height="17" /><br />
<img src="images/index_news.gif" alt="" height="82" width="200" border="0" /><br />
<strong>Find A Custom Glass Artist</strong><br />
Custom glass artists are very hard to find, we make it easy. The best custom glass around! <br />
<br />
<img src="images/index_navigationtoproundbottom.png" width="200" height="17" /></p>
<p align="center" class="style6"><span class="style10"><img src="images/index_navigationtopround.png" width="200" height="17" /><img src="images/index_norml.gif" alt="" height="82" width="200" border="0" /><br />
<strong>NORML NEWS</strong> </span><span class="style10"><br />
Valuable news and insight from a trustworthy source. They supported us from day one </span><br />
<br />
<img src="images/index_navigationtoproundbottom.png" width="200" height="17" /></p>
<p align="center" class="style6"><img src="images/index_navigationtopround.png" width="200" height="17" /><img src="images/index_finda.gif" width="200" height="82" /><br />
<span class="style9"><strong>The Finda Network </strong><br />
Learn about the team behind the site. Your comments are always appreciated!</span></p>
<p align="center" class="style6"><img src="images/index_navigationtoproundbottom.png" width="200" height="17" /></p>
</div>
<div id="mainbodycontainer">
<div id="flashnavigation">
<!-- f-source menu navigation settings (search engines friendly) -->
<!-- Change these links and press F12 to test -->
<div id='menu' style='position:absolute; visibility:hidden;'>
<div><a href='http://f-source.com'>::HOME PAGE ::</a></div>
<div id='submenu'>
<div><a href='http://f-source.com' target='_blank'>ABOUT THE FINDA NETWORK</a></div>
<div><a href='http://f-source.com'>ADVERTISING INQUIRY</a></div>
<div><a href='http://f-source.com'>COPYRIGHT INFORMATION</a></div>
</div>
<div><a href='http://f-source.com'>SMOKE SHOP LOCATOR</a></div>
<div id='submenu'>
<div><a href='http://f-source.com'>LOCAL SMOKE SHOP LOCATOR</a></div>
<div><a href='http://f-source.com'>ONLINE SMOKE SHOP LOCATOR</a></div>
<div><a href='http://f-source.com'>FIND A CUSTOM GLASS ARTIST</a></div>
<div><a href='http://f-source.com'>REVIEWS OF SMOKE SHOPS</a></div>
</div>
<div><a href='http://f-source.com'>DISCUSSION FORUM</a></div>
<div id='submenu'>
<div><a href='http://f-source.com'>GO TO THE DISCUSSION FORUM</a></div>
<div><a href='http://f-source.com'>VIEW THE MOST POPULAR TOPIC</a></div>
<div><a href='http://f-source.com/buy/adobeMenu/'>REGISTER FOR THE FORUM</a></div>
</div>
<div><a href='http://f-source.com'>GALLERY</a></div>
<div id='submenu'>
<div><a href='http://f-source.com'>GALLERY MAIN</a></div>
<div><a href='http://f-source.com'>GLASS PIPES</a></div>
<div><a href='http://f-source.com'>BONGS</a></div>
<div><a href='http://f-source.com'>BUBBLERS</a></div>
<div><a href='http://f-source.com'>SIDECARS</a></div>
<div><a href='http://f-source.com'>SMOKERS</a></div>
<div><a href='http://f-source.com'>SMOKE SHOPS</a></div>
</div>
<div><a href='http://f-source.com'>ARTICLES</a></div>
<div id='submenu'>
<div><a href='http://f-source.com'>VIEW ALL ARTICLES</a></div>
<div><a href='http://f-source.com'>STEALTH AND SECURITY</a></div>
<div><a href='http://f-source.com'>GLASS BLOWING-AN OVERVIEW</a></div>
<div><a href='http://f-source.com'>SMOKERS TERMINOLOGY</a></div>
<div><a href='http://f-source.com'>WHY WE SUPPORT NORML</a></div>
</div>
<div><a href='http://f-source.com'>PRODUCT REVIEWS</a></div>
<div id='submenu'>
<div><a href='http://f-source.com'>VIEW ALL REVIEWS</a></div>
<div><a href='http://f-source.com'>POCKET BONG REVIEW</a></div>
<div><a href='http://f-source.com'>URBAN WRAPS REVIEW</a></div>
<div><a href='http://f-source.com'>SOLOPIPE REVIEW</a></div>
<div><a href='http://f-source.com'>THE BUKKET REVIEW</a></div>
</div>
<div><a href='http://f-source.com'>NORML NEWS</a></div>
<div id='submenu'>
<div><a href='http://f-source.com'>VIEW ALL REVIEWS</a></div>
<div><a href='http://f-source.com'>POCKET BONG REVIEW</a></div>
<div><a href='http://f-source.com'>URBAN WRAPS REVIEW</a></div>
<div><a href='http://f-source.com'>SOLOPIPE REVIEW</a></div>
<div><a href='http://f-source.com'>THE BUKKET REVIEW</a></div>
</div>
</div>
<!-- You don't need to change this code directly. Read about proper menu configuration http://f-source.com/buy/mmStyleMenu/#menu_config -->
<div id="f-source-menu" style="top:10px;">
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/s...ersion=7,0,0,0" width="1024" height="48" >
<param name="flash_component" value="BusinessMenuFull.swc" />
<param name="movie" value="cssflashmenu.swf" />
<param name="quality" value="high" />
<param name="FlashVars" value="flashlet={_subButtonTextColor:#5B5B5C,_subS howSpeed:5,_subMenuColor:#fefefe,_mainButtonHeight :28,showSearchField:false,searchFieldWidth:100,_su bHighlightColor:#999999,_TransparencyShadow:100,se archTextColor:#000000,mainSoundURL:'None',_subFont :'Verdana',_subButtonHeight:15,_menuColor:#86AED2, clickSoundURL:'None',_TransparencyMain:100,_remove Dividers:false,_mainButtonTextColor:#FFFFFF,stretc h_width_to:'1024px',_mainFontSize:10,subSoundURL:' None',bg_Pic_URL:'None',_mainFont:'Verdana',_mainB utWidthExt:22,_TransparencySub:100,_mainHighlightC olor:#2A75AF,xml_Path:'None',_subFontSize:10,searc hFieldColor:#FFFFFF}" />
<param name="wmode" value="transparent" />
</object>
<noscript>
<object>
<a href="
finda is offline
Reply With Quote
View Public Profile
 
Old 01-15-2008, 02:36 PM Re: PHP Script won't stay inside container
phpknowhow's Avatar
Skilled Talker

Posts: 83
Name: Colin
Location: USA
Trades: 0
That wasn't exactly what I meant. You might want to edit most of that PHP out. In the future, don't post your entire code on a forum, just the section that's causing problems. Sorry if I was misleading. I can't seem to find the problem in this code, so I would edit it out. There is no mention of div, perhaps the problem is elsewhere?

I don't seem to be very helpful on this one. Maby just try and explain your problem in more detail.
__________________

Please login or register to view this content. Registration is FREE
| Freelance PHP solutions for small to midsized projects |
Please login or register to view this content. Registration is FREE

Last edited by phpknowhow; 01-15-2008 at 02:39 PM.. Reason: Clarification
phpknowhow is offline
Reply With Quote
View Public Profile Visit phpknowhow's homepage!
 
Old 01-15-2008, 02:41 PM Re: PHP Script won't stay inside container
Novice Talker

Posts: 14
Name: Nathan Randle
Trades: 0
This isn't strictly a PHP problem. The problem is with the HTML and CSS generated. A major problem I noticed is that a lot of the div elements have fixed heights which won't work with the content you have. Also the layer7 div looks like it would be better off within the mainbodycontainer div. Try and make those changes and see how you get on...
Dolbz is offline
Reply With Quote
View Public Profile
 
Old 01-15-2008, 02:44 PM Re: PHP Script won't stay inside container
phpknowhow's Avatar
Skilled Talker

Posts: 83
Name: Colin
Location: USA
Trades: 0
Since you made the .comment_text class have a height, its no wonder it would not all fit in there. Div's are not like tables (aka they don't expand if the content needs more height than is specified). So you need to remove the height definition in .comment_text. But by doing so, you will have to fix the rest of your layout, because the css contains that same problem multiple times.

Hope that helps.
__________________

Please login or register to view this content. Registration is FREE
| Freelance PHP solutions for small to midsized projects |
Please login or register to view this content. Registration is FREE
phpknowhow is offline
Reply With Quote
View Public Profile Visit phpknowhow's homepage!
 
Old 01-16-2008, 05:11 PM Re: PHP Script won't stay inside container
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
God i wish someone would make a plugin for VB which shows a alert thing when you paste code to like ask if you want to add the code or php brackets.

lol
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Reply     « Reply to PHP Script won't stay inside container
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.53729 seconds with 12 queries