Jump to content

Anders Moen

Members
  • Posts

    866
  • Joined

  • Last visited

Everything posted by Anders Moen

  1. I just copied my last post from the category general: I made one online at them. Look at my code now:<%Set oConn = Server.CreateObject("ADODB.Connection")sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & Server.MapPath("c:\sites\content\a\n\d\andersmoen\db\anders.mdb") & ";" & _ // This is my path to the database. "Persist Security Info=False"oConn.Open(sConnection)'...oConn.Close%> Here's the error message I get: And it says my path is at my control panel: c:\sites\content\a\n\d\andersmoenand with database it'll be c:\sites\content\a\n\d\andersmoen\db\news.mdbI seriously start hating Microsoft for making it so difficult now:P
  2. I made one online at them. Look at my code now:<%Set oConn = Server.CreateObject("ADODB.Connection")sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & Server.MapPath("c:\sites\content\a\n\d\andersmoen\db\anders.mdb") & ";" & _ // This is my path to the database. "Persist Security Info=False"oConn.Open(sConnection)'...oConn.Close%> Here's the error message I get: And it says my path is at my control panel: c:\sites\content\a\n\d\andersmoenand with database it'll be c:\sites\content\a\n\d\andersmoen\db\news.mdbI seriously start hating Microsoft for making it so difficult now:PEdit: I created a new topic in ASP so we don't get too off topic here Click here to continue this discussion about connecting to database in ASP
  3. What? Who said I didn't use div's and CSS? If you look through my source, you'll see I'm using div's with CSS. It's not a real language on the news part. It's just dummy text from lipsum.com so you can easily see how it'll look when you don't have any content to fill out yet :)Yeah, I know the dropshadow didn't get quiet as I wanted it to be. But like I've said earlier: I'm not very good in Photoshop yet but I'm practising
  4. I think the content does... if you go to the frontpage you can see yourself, but I'd say it does. Perhaps:)Easy and easy to put together...I can say I didn't use ImageReady, but I made all pictures again, just not in one big image, but in several
  5. I got a code for reading RSS in a PHP file today: <?// We make a new object$obj = new db();//Så kaller vi opp funksjonene våre$obj->koble_til();$obj->skrivut();$obj->steng_db();// CONNECTclass db{//Noen variablervar $hostname = "localhost";var $username = "your_username";var $password = "your_password";var $usertable = "your_table";var $dbName = "your_database_name";var $result;function koble_til(){// Connecting ...mysql_connect($this->hostname,$this->username,$this->password) || die(mysql_error());@mysql_select_db($this->dbName) || die("Unable to select database");}function query($query){$data = array();$this->result = mysql_query($query);if(mysql_num_rows($this->result) != 0){ while($d = mysql_fetch_object($this->result)){ $data[] = $d; } return $data;}return null;}function skrivut(){$result = $this->query("SELECT * FROM $this->usertable ORDER BY id");if (!is_null($result)){ $now = date('d.m-Y@H:i:s', time()); $rss = <<<RSS <rss version="2.0"> <channel>\n <title>Anders Moen :: News</title> <description>Anders Moen's RSS feed</description> <lastBuildDate>$now</lastBuildDate> <link>http://andersmoen.hotserv.dk/new/</link>RSS; foreach($result as $r){ $date = date('d/m/Y@H:i:s', $r->timestamp); $rss .=<<<RSS <item> <title>$r->title</title> <pubDate>$r->date</pubDate> <description>$r->content</description> <link>http://andersmoen.hotserv.dk/new/?page=view&id=$r->id</link> </item>RSS; } $rss .="</channel></rss>";header('Content-type:text/xml');print $rss;}}function steng_db(){mysql_free_result($this->result);mysql_close();}}?> Some of the explanations here is in Norwegian since I got it on a Norwegian forum today.Well, wanna see it? Click here
  6. You made this program, or did someone else?
  7. Thanks for writing all that about my site.Well, if you've looked at the other sites I've made, you gotta say this is pretty good (read what Life in Binary said and stuff), hehe.- Is it easy for me to put together efficiently and quickly?-- What you mean?- Does it portray what the site is about?-- Well, I'm not sure, but I think it's pretty obvious that the site is a personal one.- Is it easy on the eyes ?-- It was for my eyes, and hopefully it is for other people too.- Is it easy to navigate?-- I would say so.- Does it appeal to users to look through the rest of the site?-- Don't know.- Does the content _flow_ together?-- What you mean?
  8. <form action="some_other_site.php" method="post"><input type="image" src="images/createaccount-button2.gif" alt="Create Account" ></form> Is this what you mean?
  9. Anders Moen

    Opera and IE

    So you changed thisbody {background-image:url('images\background.jpg')}to thisbody {background-image:url('images/background.jpg')}?
  10. Anders Moen

    Why HTML?

    XHTML is the newer version of HTML.XHTML will probably replace HTML later some time, isn't that true? I think I read at W3.org
  11. Anders Moen

    Opera and IE

    <body bgcolor="#FFFFFF">Don't write it like that.Write <body> instead, and in the CSS you writebody {background-image:url('images\background.jpg'); background-color: transparent; }I don't know if it'll work, but maybe...Edit:Are you sure it's gonna be a backslash, and not a normal slash (/)
  12. It's cool, but what is it for? Is it for my site, your site, someone else's site? Hehe...
  13. Thanks!Oh yeah, the footer, I don't really like the text either, but I didn't know which font to use. I will change it to a background and take that text away, so I can have links to validator about my valid site and that I made the CMS I'm using there, and that's true. Just gonna finish it first, haha.Well, I don't have FF on this computer, but I'll download it now to check it. That's almost weird, cause it works in IE, but not in FF :)I downloaded FF, and I put this around the menu: <p class="content" style="display: inline;">Menu here</p>But look in IE and Opera now =/And when I take class="content" away, it looks just the same as it did before.
  14. Okay, my site has been uploaded now :)The link is http://andersmoen.hotserv.dk/new/.Hope you'll like it this time. On the about page I might take a picture of me playing guitar, and then make my figur all black, cause that's really cool I think.
  15. Yeah, I know. I started slicing it up and code it, and I didn't get it like that, so the buttons are just normal text with white background-color.I will upload it later, so you're able to see it "live" soon
  16. Okay, thanks..Well, I made a new one (which is more blue ), but I haven't got in any content yet, but here it is:*If you see text on it, (except links and stuff), but content, I've updated it.*And I didn't use very much time making this in Photoshop, so the menu is a bit "not good" yet, and stuff, hehe. But if you like it, I will make it better. And I also might put a picture of me with a guitar on it, just make it all black (that's cool)
  17. echo BBCode($nrow['news_info']) . "<br />\n";I'm not sure if this goes right...echo bbcode($nrow['news_info']);echo "<br />";I think you need to do that. And you should strip slashes too, so you don't get several backslashes in front of these ' and stuff.echo stripslashes(bbcode($nrow['news_info'])); // Try this instead,echo "<br />";
  18. This shows an <br> instead of <br />?Because I use the same bbCodes, and they show <br /> and not <br>I got mine at bbcode.org, like I see you did.Just try to copy in mine: <?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 // $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; }?>
  19. Vchris: that's what I'm kinda doing. I'm following talk-mania's tutorials of making websites in just one big photo.And then afterwards I can slice it up, and start coding it all up. I've learned a lot already after just two tutorials.My two results are here, and here.I only got the first one in a picture right now, but the second one you can see "live" here.
  20. I'm 15 too and I know HTML, XHTML, CSS, JavaScript, PHP and MySQL, and I'm learning ASP(.NET), ActionScripting in Flash and one more thingbut I can't remember it right now haha.And I know Photoshop, though I'm not very good init.Well, welcome
  21. Yeah! I would love that you made some graphics for me! That would be so lovely of you.If you go here, you'll see how bad I am in Photoshop. Those images there is the most advanced I've ever made, haha!Well, thank you
  22. Mhm, okay. I'll try to find on something.I'm gonna try out a new template now, from that site again, just this time I'm gonna go for one of the tutorials that's called "Simple profesional"
  23. Yeah, I know, but right now I just followed the tutorials with their colors.Well, I've changed the content background to white:
  24. Okay, I've started checking out webdesign tutorials at Talk-Mania. They have really nice templates there, so I've gotten a lot of ideas. Too bad they only have 3 for portfolios =/ but I'm checking out every tutorial :)Edit:I looked at one of the tutorials, and I made the image further down. I'm not very good in Photoshop so it's not exactly the best, but at least I got something...what you think of it?(Further down, I had to remove these two, because they took to much space)
×
×
  • Create New...