Jump to content

Anders Moen

Members
  • Posts

    866
  • Joined

  • Last visited

Everything posted by Anders Moen

  1. Hey again!I was just wondering...what's wrong here? In IE it works fine (surprisingly enough), and in Opera and FF it doesn't...I'll take a screenshot of how it should look, and one where it doesn't show right.Actually, I'm not...you can go there and check in your browsers yourself. Here's the linkI know the bg is really awefull, but I'm not very good in Photoshop yet. =/
  2. Thanks! I didn't think of those two sites.I might make this: www.andersmoen.hotserv.dk/newI will change the girl out if I'm gonna use it, though. Maybe with the girl I like...maybe I should tell her soon, that I like her I mean lol. Or should I?
  3. Oh...I didn't think of that newbeginners would feel really bad or something like that, and not come back. I would, even though I'm not good designing sites. If someone draw the whole site for me I could code it (XHTML, CSS, PHP and MySQL and maybe some simple Flash).I've been thinking of a new design to my personal site for ages now, and I just can't find on anything... (it's off topic, I know lol). Does anyone here got any cool web sites they know about? (rather personal sites).I've been looking at W3CSites.com, searching at Google and I just can't get any ideas for my site :'(
  4. Those that's made with XHTML :)Though it starts with the basic HTML tags like <html> instead of <xhtml>. Why is it like that, really? That's kinda weird...lol
  5. Hmm...well, I inserted it to my site, just to check it, and it works fine with me...Here's the link (at the bottom)Code again: <html><head><title>Clock</title><script type="text/javascript"> function startTime() { var today=new Date() var h=today.getHours() var m=today.getMinutes() var s=today.getSeconds() // add a zero in front of numbers<10 m=checkTime(m) s=checkTime(s) document.getElementById('txt').innerHTML=h+":"+m+":"+s t=setTimeout('startTime()',500) } function checkTime(i) { if (i<10) {i="0" + i} return i } </script></head><body onload="startTime()"><div id="txt">Do not change the name of this div! Or the names in the JS script, UNLESS you know what you're doing;)</div></body></html>
  6. Okay, so it seems like you disagree me.But still, make some competitions...with or without prizes. The prize could be honor lol
  7. Anders Moen

    Security

    If you use for example inputs so people can add things, that'll go into a database, you should use something like mysql_real_escape_string (read more)
  8. Anders Moen

    "?" in Urls

    I can't explain this, but this is like GET method in forms (<form method="get">).
  9. Oh...when you say it, I was looking for the same! lolWell, I'm gonna try out the one I found at Dynamic Drive. Seems easy enough.
  10. If you need BBCodes: <?php/************************************************//* BBCode v1.0a *//* Date: 03/2003 *//* *//* A simple and effective script that *//* allows you to implement bbcode type *//* behaviour on your php website. *//* *//* Contact: bbcode@swaziboy.com *//* feel free to contact me for support if you *//* need help *//* *//* Usage: *//* *//* Put the following line at the top of *//* the page you want to have the bbocde *//* in...(assumes both pages are in the *//* folder *//* *//* include("bbCode.php"); *//* *//* Pass the text to the function: *//* *//* $mytext = BBCode("This is my BBCODE"); *//* or *//* $mytext = "This is my text"; *//* $mytext = BBCode($mytext); *//* *//* echo $mytext; *//* *//************************************************/?><style type="text/css"><!--body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;}.bold { font-weight: bold;}.italics { font-style: italic;}.underline { text-decoration: underline;}.strikethrough { text-decoration: line-through;}.overline { text-decoration: overline;}.sized { text-size:}.quotecodeheader { font-family: Verdana, arial, helvetica, sans-serif; font-size: 12px; font-weight: bold;}.codebody { background-color: #FFFFFF; font-family: Courier new, courier, mono; font-size: 12px; color: #006600; border: 1px solid #BFBFBF;}.quotebody { background-color: #FFFFFF; font-family: Courier new, courier, mono; font-size: 12px; color: #660002; border: 1px solid #BFBFBF;}.listbullet { list-style-type: disc; list-style-position: inside;}.listdecimal { list-style-type: decimal; list-style-position: inside;}.listlowerroman { list-style-type: lower-roman; list-style-position: inside;}.listupperroman { list-style-type: upper-roman; list-style-position: inside;}.listloweralpha { list-style-type: lower-alpha; list-style-position: inside;}.listupperalpha { list-style-type: upper-alpha; list-style-position: inside;}--></style><?php //Local copy function BBCode($Text) { // Replace any html brackets with HTML Entities to prevent executing HTML or script // Don't use strip_tags here because it breaks [url] search by replacing & with amp $Text = str_replace("<", "<", $Text); $Text = str_replace(">", ">", $Text); // Convert new line chars to html <br /> tags $Text = nl2br($Text); // Set up the parameters for a URL search string $URLSearchString = " a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'"; // Set up the parameters for a MAIL search string $MAILSearchString = $URLSearchString . " a-zA-Z0-9\.@"; // Perform URL Search $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/", '<a href="$1" target="_blank">$1</a>', $Text); $Text = preg_replace("(\[url\=([$URLSearchString]*)\](.+?)\[/url\])", '<a href="$1" target="_blank">$2</a>', $Text); //$Text = preg_replace("(\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[/url\])", '<a href="$1" target="_blank">$2</a>', $Text); // Perform MAIL Search $Text = preg_replace("(\[mail\]([$MAILSearchString]*)\[/mail\])", '<a href="mailto:$1">$1</a>', $Text); $Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.+?)\[\/mail\]/", '<a href="mailto:$1">$2</a>', $Text); // Check for bold text $Text = preg_replace("(\[b\](.+?)\[\/b])is",'<span class="bold">$1</span>',$Text); // Check for Italics text $Text = preg_replace("(\[i\](.+?)\[\/i\])is",'<span class="italics">$1</span>',$Text); // Check for Underline text $Text = preg_replace("(\[u\](.+?)\[\/u\])is",'<span class="underline">$1</span>',$Text); // Check for strike-through text $Text = preg_replace("(\[s\](.+?)\[\/s\])is",'<span class="strikethrough">$1</span>',$Text); // Check for over-line text $Text = preg_replace("(\[o\](.+?)\[\/o\])is",'<span class="overline">$1</span>',$Text); // Check for colored text $Text = preg_replace("(\[color=(.+?)\](.+?)\[\/color\])is","<span style=\"color: $1\">$2</span>",$Text); // Check for sized text $Text = preg_replace("(\[size=(.+?)\](.+?)\[\/size\])is","<span style=\"font-size: $1px\">$2</span>",$Text); // Check for list text $Text = preg_replace("/\[list\](.+?)\[\/list\]/is", '<ul class="listbullet">$1</ul>' ,$Text); $Text = preg_replace("/\[list=1\](.+?)\[\/list\]/is", '<ul class="listdecimal">$1</ul>' ,$Text); $Text = preg_replace("/\[list=i\](.+?)\[\/list\]/s", '<ul class="listlowerroman">$1</ul>' ,$Text); $Text = preg_replace("/\[list=I\](.+?)\[\/list\]/s", '<ul class="listupperroman">$1</ul>' ,$Text); $Text = preg_replace("/\[list=a\](.+?)\[\/list\]/s", '<ul class="listloweralpha">$1</ul>' ,$Text); $Text = preg_replace("/\[list=A\](.+?)\[\/list\]/s", '<ul class="listupperalpha">$1</ul>' ,$Text); $Text = str_replace("[*]", "<li>", $Text); // Check for font change text $Text = preg_replace("(\[font=(.+?)\](.+?)\[\/font\])","<span style=\"font-family: $1;\">$2</span>",$Text); // Declare the format for [code] layout $CodeLayout = '<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class="quotecodeheader"> Code:</td> </tr> <tr> <td class="codebody">$1</td> </tr> </table>'; // Check for [code] text $Text = preg_replace("/\[code\](.+?)\[\/code\]/is","$CodeLayout", $Text); // Declare the format for [quote] layout $QuoteLayout = '<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class="quotecodeheader"> Quote:</td> </tr> <tr> <td class="quotebody">$1</td> </tr> </table>'; // Check for [code] text $Text = preg_replace("/\[quote\](.+?)\[\/quote\]/is","$QuoteLayout", $Text); // Images // [img=pathtoimage] $Text = preg_replace("/\[img\](.+?)\[\/img\]/", '<img src="$1">', $Text); // [img=widthxheight]image source[/img] $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.+?)\[\/img\]/", '<img src="$3" height="$2" width="$1">', $Text); return $Text; }// THANKS TO BBCODE.ORG FOR THESE WONDERFULL BBCODES?> Then you just use in the while:echo bbcode($name);or was it something else? Just wait...I'll check on my own site :)Edit: the right way to display them:echo bbcode($row[name]);If you for example save the BBCodes in a file called bbcode.php and then include('bbcode.php'); on the site you need them. That's what I'm doing and it works fine.
  11. Anders Moen

    shoutbox

    Or Hotscripts.com*Can't be bothered to find the link to the site with chatscripts myself*
  12. Anders Moen

    Uplopad File

    Oh...I thought it was the width or something I, because 1024 is a pretty standard screen. Well, many people have 1024 px screens. Or something like that...I'm gonna shut up now lol
  13. Anders Moen

    Uplopad File

    echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />\n";1024 is the largest or? Because that's very low... I had to put mine on like 1000000 to upload an .jpg image that's 800px (width) and 100px (height).I didn't necessary had to take more than some less I guess, but I just couldn't be bothered to find out the filesize. Because the ["size"] which you obvious think is the width/height, is how much KB the image is...and that takes some KB you know
  14. I found out why you were redirected that far. I had forgotten to change one redirect, hehe... Now it should work fine again, I guess.Edit: anyone got any ideas for a name for the CMS system? Like Wordpress and Cutenews and stuff? I want to like have "Powered by some name" like many forums and other CMS systems.D%*ยค! I haven't put on comments yet! I'll try to do it now
  15. It's Flash, yes. And that's not hard to see yourself. If you right-click on it, you'll get the Flash menu where it says "About Adobe Flash 'number'".And I can't see it, because it obvious don't work in Opera, because it's an error code they're using, so I can't see how it looks
  16. I know the meta isn't the best, but it doesn't work to use header in body, does it? I thought that had to be over <html>?If so, I don't know how to check if a user is logged in or not. I can add the login script here, and then you can check it out and help me, maybe? <?phpif ($_SESSION['online']) {echo "Welcome " . $_SESSION['username'] . "<br /><br /><br /><a href=\"1.php\">Add news <b>with</b> image</a><br /><br /><a href=\"other.php\">Add news <b>without</b> image</a>";}else if (isset($_POST['username']) && isset($_POST['password'])) {$db=mysql_connect("localhost", "username", "password");mysql_select_db("db_name", $db); $username = htmlentities($_POST['username']); $password = htmlentities($_POST['password']); $username = mysql_real_escape_string($username); $password = mysql_real_escape_string($password); $query = mysql_query("SELECT username, password FROM members WHERE username = '$username' AND password = '$password'"); if(mysql_num_rows($query) == 1) { $_SESSION['online'] = true; $_SESSION['username'] = $username; echo "Welcome $username!<br /><br /><br /><a href=\"1.php\">Add news <b>with</b> image</a><br /><br /><a href=\"other.php\">Add news <b>without</b> image</a>";mysql_close($db); }}else {?><h1>Login</h1><form action="" method="post"><p>Username<br /><input type="text" name="username" /></p><p>Password<br /><input type="password" name="password" /></p><p> <br /><input type="submit" name="submit" value="Login" /></p></form><?php}?> Notice this: I have two places where it says hello and then the username...or something like that. That's because the first time you come to a site (when you're logged in), it says the message that's longest down, and the one that's on the top, shows the second time, and the third and yeah, you get the point...
  17. Hmm...can you please just try again? Because that's weird :S - it shouldn't happen.The URL was http://www.andersmoen.hotserv.dk/test/other.php right?
  18. I just made my own, but since I've spent a lot of time using it I won't give it out for free.But I guess you can use Wordpress. I don't know what kinda functions it got, but I've heard lots of good stuff about it.
  19. Okay, since you've been so "crazy" about the login system, I added it! lolTest it again nowUsername: demoPassword: demoJust couldn't be bothered to make a logout link right now, but when you need to log out, just write http://www.andersmoen.hotserv.dk/test/logout.php or click here (I'm not 100 % sure if the last one will work but I guess so)
  20. You can use XAMPP! I use it and I'm happy with it Download here
  21. You have to attract more people to come here to the forum! I wanna help people, but it bearly happens things here...and because I live in Norway I'm not logged on on the same time as many others, so I get like 10 topics to answer at once, and then nothing happens for several hours.You should maybe update W3Schools.com (the site itself) and attract more people to come to the forum. I'd love to help building a new site :)Maybe you could arrange a design competition, where the winner get some money...maybe 100 dollars or something?
  22. You can use phpBB.There you can change the look and stuff yourself, or you can simply download phpBB templates and install them on your site.When you first download it, you get the template called subSilver, and that's the template they're using on their support forum. What I have done, is to translate the whole thing to Norwegian (not all done yet), and changing the look on it. You can see it here.
  23. Custom error sites with .htaccess: ErrorDocument 404 http://www.yoursite.com/404.php It doesn't necessary need to be called 404.php but that's just for an example
  24. New thing to the system! You can now upload pictures to your testing! Remember to fill out [img=images/name_on_image_you_uploaded.filetype] If the image' name was "W3Schools Forum.gif", you need to fill out the code like this: [img=images/W3Schools Forum.gif] because Linux servers are sensitive on small and big letters, which you probably knew lolIt'll say when you don't have to use images/ but right now I can't do anything...when I can, I will also put on the login script since people obvious is "crazy" about it.
  25. Because most hosts let you use FTP, instead of online editing (which is really bad...my opinion)But you might edit online, though.But if you want to add a banner on top, you could just do it like this: XHTML:<div id="top"><img src="image.gif" alt="" /></div>CSS:#top {width: Xpx; // change X with for example 800.height: Xpx; // change X with for example 100. This is what you mean, or is it something else?Edit: I noticed not moving the other content longer down.You might need to like use the height and width you already have on the top banner, and then use:overflow: yes; // or auto. I don't remember which one that validates, if not both does it.
×
×
  • Create New...