FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


can you help me?





budazz
i have a shoutbox...but it has a bug...
the problem is when i mouseover the name with a link ...it always go to the link...with "http://mydomain.frihost.net/shoutbox/his.domain.com"
it doesnt visit the real page...it has an error so there is a error 404 page not found

here is the code


for the tag.php


Quote:

<?
//--------------------------------------------------------------------------------------

$config = "config.php";
include $config;
?>
<html>
<title></title>
<head>
<link rel="stylesheet" href="style.css">
<meta http-equiv="refresh" content="<? echo "$refresh"; ?>">
</head>
<body topmargin="1" leftmargin="2">

<?
if ($show == "limit") {
$limits = $limit-1;
if ($max) {} else { $max="$limits"; }
if ($min) {} else { $min="0"; }
$tag = file ("entries.db");
$count = "0"; while (list ($key, $val) = each ($tag)) {
if ($key >= $min && $key <= $max) {

$old = fopen ("entries.db", "r");
$old2 = fread ($old, filesize ("entries.db"));
fclose ($old);

$tosplit = "|";
$contarr = explode($tosplit,$val);
$name = $contarr[0];
$comment = $contarr[1];
$website = $contarr[2];
$date = $contarr[3];
$ip = $contarr[4];

if ($website == "http://" || $website == "") {
echo "$name$spacer $comment<br>";
}
else {
echo "<a href=\"$website\" target=\"_blank\">$name</a>$spacer $comment<br>";
}
}

$count++;
}
if ($min > 0) {
$n_max = $max - 10;
$n_min = $min - 10;
}

if ($count > $max) {
$n_max = $max + 10;
$n_min = $min + 10;
}
}

if ($show == "all") {
$limits = $limit-1;
if ($max) {} else { $max="$limits"; }
if ($min) {} else { $min="0"; }
$tag = file ("entries.db");
$count = "0"; while (list ($key, $val) = each ($tag)) {
if ($key >= $min && $key <= $max) {

$old = fopen ("entries.db", "r");
$old2 = fread ($old, filesize ("entries.db"));
fclose ($old);

$tosplit = "|";
$contarr = explode($tosplit,$val);
$name = $contarr[0];
$comment = $contarr[1];
$website = $contarr[2];
$date = $contarr[3];
$ip = $contarr[4];

if ($website == "http://" || $website == "") {
echo "$name$spacer $comment<br>";
}
else {
echo "<a href=\"$website\" target=\"_blank\">$name</a>$spacer $comment<br>";
}
}

$count++;
}

echo "<center>";

if ($count == "0") {
echo "<center>there is 0 entries in total";
}

if ($count == "1") {
echo "<center>there is 1 entry in total";
}

if ($count >= "2") {
echo "<center>there is $count entries in total<br><br>";
}
if ($min > 0) {
$n_max = $max - $limit;
$n_min = $min - $limit;
echo "<a href=\"tags.php?show=all&max=$n_max&min=$n_min\"><b>back</b></a> ";
}

if ($count > $max) {
$n_max = $max + $limit;
$n_min = $min + $limit;
echo "<a href=\"tags.php?show=all&max=$n_max&min=$n_min\"><b>more</b></a>";
}
echo "<br><a href=\"http://www.venturenine.com\" alt=\"Tagger of Venture Nine Solutions by Brian Benzinger\" target=\"blank\"><i>tagger version two</i></a></center>";
}

?>
</body>




for the sign.php
Quote:

<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
<body topmargin="0" leftmargin="2" onload="location.replace('tags.php?show=limit');">
<?

$config = "config.php";
include $config;

$date = date("F j, Y, g:i a");

function text_to_face($str)
{
include("smilies/smilies_data.db");
return $str;
}

if (($name != "name") && ($comment != "comment") && ($name != "") && ($comment != "")){
$old = fopen ("entries.db", "r");
$old2 = fread ($old, filesize ("entries.db"));
fclose ($old);

$comment2 = str_replace("\r\n","<br>",$comment);
$comment2 = str_replace("\r\n","<br>",$comment);
$comment2 = str_replace("|","l",$comment2);
$comment2 = str_replace("<","&lt;",$comment2);
$comment2 = str_replace("\n","<br>",$comment2);
$comment2 = str_replace("<","&lt;",$comment2);
$comment2 = stripslashes($comment2);

if ($smile == "1") {
$comment2 = text_to_face($comment2);
}

$name = str_replace("<","&lt;",$name);
$name = str_replace("|","l",$name);
$name = stripslashes($name);

$name = str_replace("<","&lt;",$name);
$name = str_replace("|","l",$name);
$name = stripslashes($name);

$website = str_replace("|","l",$website);
$website = str_replace("<","&lt;",$website);

$new = "$name|$comment2|$website|$date|$REMOTE_ADDR|";

$fp = fopen ("entries.db", "w");
fwrite ($fp, "$new\n$old2");
fclose ($fp);

}
else {

}

?>
</body>


hope you can help me Crying or Very sad

[/quote]
CCR
The problem is I think in your tag.php if the link does nto start with http:// then it tags it as "<a href=\"$website\" target=\"_blank\">$name</a>$spacer $comment<br>"; witch would be like www.domain.com so either make sure all links start with http:// or try to insert http:// into the line so it will open a page and not add to the old link.
budazz
ok ill try what you are saying...hmmmm....additional question...when i inserted the email (not the httP:) it also appears to " http://me@gmail.com which is wrong....it makes me sick already....but thanks for the suggestion...ill try it Very Happy
CCR
Not sure if your tring to get this to work in a fourm or jsut one a web page but you might wanta check out http://www.hotscripts.com/search/6003087.html if you are having lots of trouble outta it cause there is alot of shoutbox soruces out there.
budazz
i know it...as a matter of fact i get the shoutbox im using right now in hotscripts.com....: ) Very Happy
Sunny
I have used Webfroot shoutbox earlier http://shoutbox.sourceforge.net/

Not the alpha version though, I used 2.32 I think,It worked great.
Daniel15
I suggest you get a Flash-based Shoutbox. That way, you don't get the constant flicker of the shoutbox refreshing

I've used ZZ:FlashChat previously, but it was a while ago so I can't really remember much about it.
budazz
thanks for the suggestion...i appreciate it Very Happy
Related topics
can i help?
help,Bonding
HELP!!
Help me with MySQL Account Maintenance and phpBB 2.0.15 :((
help, change pass my acc in cpanel
help me upgrade php to 5.
Need help adding a domain
help add admin in phpbb forum
How to solve this problem? Thanks
Help!
Help me change port for phptriad
problam Plz help
Help!!
Google Ads help fund Spyware ?
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.