Jump to content


  • Posts

  • Joined

  • Last visited

Previous Fields

  • Languages
    (X)HTML, CSS, JavaScript, ASP.NET, PHP

Contact Methods

  • Website URL
  • ICQ

GermanPrince's Achievements


Newbie (1/7)



  1. GermanPrince

    BBCode Code

    I have a BBCode parser and it won't process the code tag.Parser: $replace = array("/(\[b\])(.+)(\[\/b\])/i","/(\[i\])(.+)(\[\/i\])/i","/(\[u\])(.+)(\[\/u\])/i","/(\[h1\])(.+)(\[\/h1\])/i","/(\[h2\])(.+)(\[\/h2\])/i","/(\[img\])(.+)(\[\/img\])/i","/(\[url=)(.+)(\])(.+)(\[\/url\])/i","/\[code\](.+)\[\/code\]/i");$pattern = array("<b>\\2</b>","<i>\\2</i>","<u>\\2</u>","<h2>\\2</h2>","<h3>\\2</h3>","<img src=\"\\2\" alt=\"Coder Studio\" />","<a href=\"\\2\">\\4</a>","<div id=\"code\">\\1</div>");$text = preg_replace($replace,$pattern,$text); Text: #include <iostream> #include <string> using namespace std; int main() { string str = "This is a string."; cout << str << endl; system("PAUSE > NUL"); return 0; }
  2. Yes, that was also on my list of things to do.
  3. Well I have finished my blog on my site GermanPrince. So tell me what you think.
  4. I'm trying to make it so when I select an input field it clears itself. It's not working though. Here is my code:html <input class="searchbox" type="text" name="searchFor" value="Search" onFocus="clear(this)" onKeyDown="return submitenter(this,event)" /> javascript function clear(input) { if (input.value == input.defaultValue) input.value = "";} Any suggestions?
  5. Thank you, for some crazy reason I changed that.
  6. GermanPrince

    CSS Border

    I have set a border for my blog that seperates the search box and the blog post at my site (Blog). Yet, it doesn't appear... Here is my code:blogcontent.php <div id="blog"> <div id="posts"> <?php include_once("dbconnect.php"); $query = "SELECT * FROM posts ORDER BY id DESC"; if(!$result = mysql_query($query)) { echo "<h3>ERROR</h3>Could not query database."; } $cur = 0; while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) { if ($cur >= 5) break; $title = $row["title"]; $date = $row["date"]; $msg = substr($row["message"],0,100); echo "<div id=\"block\">"; echo "<h1>".$title."</h1>"; echo "<p class=\"date\">".$date."</p><p class=\"msg\">".$msg."</p>"; echo "</div>"; $cur++; } ?> </div> <div class="search"> <form action="search.php" method="post"> <input type="text" name="searchFor" value="Search" onKeyDown="return submitenter(this,event)" /> </form> </div></div> index.css * { margin:0px; padding:0px;}body { background-color:#545456;}/* Header Style */#head { background-color:#414143; width:800px; min-height:150px; margin:0px auto;}#head img { margin:20px 20px; float:left;}#head p { margin:40px 0px; float:left; font-family:Tangerine, Sans-Serif; font-size: 50px; color:#FFFFFF; text-shadow:4px 4px 4px #000000;}/* Navigation Bar Style */#navbar { width:800px; min-height:30px; margin:0px auto;}#navbar ul { list-style-type:none;}#navbar li { float:left;}#navbar a { display:block; width:200px; background-color:#414143; min-height:30px; text-align:center; color:#FFFFFF; text-decoration:none; font-family:Tangerine, Sans-Serif; text-shadow:4px 4px 4px #000000; font-size:26px;}#navbar a:hover { background-color:#3A3A3C;}/* Footer Style */#foot { width:800px; min-height:30px; background-color:#414143; margin:0px auto; text-align:center;}#foot p { font-family:Sans-Serif; font-size:16px; color:#FFFFFF; padding:2px;}/* Blog Style */#blog { width:800px; min-height:20px; margin:0px auto; background-color:#414143; display:block; overflow:hidden;}#blog .posts { width:600px; min-height:20px; padding:20px 0px 20px 20px; float:left; background-color:#414143; border-style:none solid none none; border-width:5px; border-color:#FFFFFF;}#blog .search { width:155px; padding:20px 10px 20px 10px; float:left; background-color:#414143; border-style:none none solid none; border-width:5px; border-color:#FFFFFF;}/* Post Style */#post { width:800px; min-height:20px; margin:0px auto; background-color:#414143; display:block; overflow:hidden;}#post form { color:#FFFFFF; padding:20px; float:left;}#post .btn { width:70px;}#post p { color:#FFFFFF; float:right;}#post .title { width:300px;}/* Article Style */#article { width:800px; min-height:20px; margin:0px auto; background-color:#414143; display:block; overflow:hidden; padding:20px;}#article .title { font-family:Sans-Serif; font-size:24px; font-weight:bold; color:#FFFFFF;}#article .date { color:#D3D3D3; font-family:Sans-Serif; font-size:12px; float:left;}#article .msg { color:#FFFFFF; font-family:Sans-Serif; font-size:12px; float:left;}#article img { float:left; max-width:560px; max-height:560px; float:left;}#article a { color:#FFFFFF; text-decoration:none; color:#FFFFFF; font-family:Sans-Serif; font-size:12px; float:left;}/* Preview Style */#block { width:560px; min-height:20px; margin:0px auto; background-color:#414143; display:block; overflow:hidden; padding:20px; color:#FFFFFF; float:left;}#block h1 { color:#FFFFFF; font-family:Sans-Serif;}#block .date { color:#D3D3D3; font-family:Sans-Serif; font-size:12px;}#block .msg { color:#FFFFFF; font-family:Sans-Serif; font-size:12px;} Any help would be appreciated.
  7. Try clearing your cache if it still doesn't work. Usually works for me.
  8. How about creating a div inside a div. You have a div a little bit bigger then the one inside to make it look like a border. Set the inner divs z-index to that of above the outer div. The outer div should only be click-able on where it is showing. This is just a theory now. So don't get excited.
  9. I know. Simple is the key to it.
  10. Any suggestions? I got rid of the errors the best I could. Any design suggestions?Link: GermanPrince
  11. I initialized it and tested it, but I still don't get an email. How long does it take usually?
  • Create New...