Jump to content

lostprophetpunk

Members
  • Posts

    270
  • Joined

  • Last visited

    Never

Everything posted by lostprophetpunk

  1. $ip = $_server['REMOTE_ADDR']; $list($first,$second,$third,$fourth) = explode('.',$ip); // $second is the second part of the IP Adress // just use the variables as needed, as in echoing them out... echo $first, $second; (you get the point) Hope this helped.
  2. The one you said that was too small to see...click on 'download' and you will get this. Also, for the old portfolio design...I never bothered finishing the markup as I never wanted to. This is because I wanted to concentrate on the functionality of the blog system, rather than the markup. I left that so I could work on my blog system to make it better. Which is what will be shown on my website along the second one.
  3. The first one that can be critiqued is My Old Portfolio Design. I never got around to putting content up on there apart from a few blog posts. The blog system was made by myself. The second one is this. It's for the website I have now. I have nearly finished coding the whole site. The guy is a piece of artwork by myself. The third one is this. This was actually going to be the design for the blog system (made by myself) but I decided against it. If you want to see it in action here (I know their are some cross browser css issues, I just never fixed them because I wasn't going to use the design anymore). Hope you like them.
  4. The design is not that bad. It could do with come improvements, such as making the footer touch the bottom of the page instead of having a whitespace, and also remove the double footer. The typography of the site needs some work, as I see that you only use about 1 font, which is bad. Also, make the images stand out a bit more (the photos), to draw the user in.
  5. I think the design isn't bad, but it could do with some improvements. The padding on the 'Welcome' box needs t be sorted out, it looks odd with different padding. You also need to work on your spacing and alignment, as I see lots of spacing that could be fixed with the products. You should code it after making those improvements.
  6. I am working on a function to check emails, but I have come across a problem. The problem is that it always returns the $valid as 0, even when the email address is valid. Here is the code involved... function ccheckdnsrr($host, $type='mx'){ $res=explode("\n",strstr(shell_exec('nslookup -type='.$type.' '.escapeshellarg($host).' 4.2.2.3'),"\n\n")); if($res[2]){ return TRUE; }else{ return FALSE; } } function checkemail($email) { $address = $email; $count = substr_count($address, '@'); if($count == 1 ) { $regexp = "^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$"; if (eregi($regexp, $email)) { list($name,$domain) = explode("@",$email); $ip = gethostbyname($domain); $meh = ccheckdnsrr($name); if($meh == false) { $valid = 0; }else { $valid = 1; } }else { $valid = 0; } }else { $valid = 0; } return $valid; } If anyone could help, that would be awesome.
  7. I forgot to mention (sorry) that I have tried this already, but all it echos is the ip address.
  8. I know how to get an ip adress from a domain by using gethostbyname(), but I wanted to know if it was possible to get the domain name from the ip address. As in a website address (example.com) has a ip address of xxx.xx.xxx.xxx What I am trying to do is to get the 'example.com' domain name from the ip address. Is this at all possible, if so, how can it be done? Thanks in advance for any that helps out.
  9. That has helped me alot, thank you very much.
  10. Hello all, I am currently having some trouble with some variables on my page. The problem is that it is supposed to read the 'n' off of the /blog/?n=1 (1 used for example), but it doesn't seem to do this. The code is being used for a pages system. The code I have so far is... $pn = mysql_real_escape_string( $_GET['n'] ); $sql40 = "SELECT * FROM `posts` ORDER BY `id`"; $res40 = mysql_query($sql40) or die(mysql_error()); $rows = mysql_num_rows($res40); $limit = 0; if($pn = 1){ $limit = 4; }else if($pn= 2){ $limit = 8; } $perpage = 4; $sql4 = "SELECT * FROM `posts` ORDER BY `id` desc LIMIT ".$limit.",".$perpage.""; $res4 = mysql_query($sql4) or die(mysql_error()); I thought that would work, changing the query based on the two variables: $limit and $perpage, but it doesn't work. I am trying to make it so that if it was on page 1...it would display the latest 4 rows from the database, then on page 2 it would display the next 4, and so on until it reaches the end. If anyone could help out, that would be awesome. Thanks in advance.
  11. I am coding a design I have created...but I have come across a problem. When I put my slideshow in a div...it makes the image display at the very top left of the screen, and the numbers that navigate the slideshow at the very bottom left of the screen...I just cannot figure out why it is doing this. It is the same code as I used this for another design and it worked fine...it just seems to playing up on this. Before you ask, the CSS is on the same page but I removed it in this post so I could post the two different parts. If anyone could help that would be awesome. CSS Code... * { margin: 0; padding: 0; } body { font: normal 12px arial; background-color: #dfdede; } p { padding-bottom: 20px; } .slideshow a, a:visited { color: #037ca3; text-decoration: none; font-weight: 900; } .slideshow a:hover { color: #000000; text-decoration: none; } .info { width: 280px; text-align: left; float: right; margin-right: 10px; margin-top: 10px; font-family: georgia; font-size: 9pt; text-align: right; } .slideshow { position: relative; background: #fafafa; width: 700px; height: 240px; border: 1px solid #e5e5e5; margin-bottom: 20px; } .slideshow img { position: absolute; top: 3px; left: 3px; z-index: 1; background: #ffffff; } ul.recentlist { position: absolute; bottom: 8px; left: 4px; list-style: none; z-index: 2; } ul.recentlist li { margin: 0; padding: 0; display: inline; } ul.recentlist li a, ul.recentlist li a:visited { display: block; float: left; padding: 4px 8px; margin-right: 1px; color: #000000; text-decoration: none; cursor: pointer; } ul.recentlist li a:hover, ul.recentlist li a:visited:hover { background: #999999; color: #ffffff; } ul.recentlist li a.current { background: #037ca3; color: #ffffff; } #wrapper { width: 900px; margin: auto; } #mwrapper { width: 900px; margin: auto; } #header { width: 100%; height: 100px; background: transparent url(images/headerbg.png) repeat-x center center; } #logo { width: 71px; height: 75px; background: transparent url(images/logo.png) no-repeat center center; margin-top: -3px; margin-left: 10px; } #search { float: right; margin-top: -9px; } .search { background-color: #665c4f; border: 1px solid #94897d; padding: 2px; color: #ffffff; font-family: verdana; } #nav { width: 100%; height: 26px; background: transparent url(images/navbg.png) repeat-x center center; } #nav a:link { display: block; height: 26px; width: 90px; font-family: trebuchet ms; font-size: 12pt; color: #bbad9d; text-decoration: none; text-align: center; } #nav a:visited { display: block; height: 26px; width: 90px; font-family: trebuchet ms; font-size: 12pt; color: #bbad9d; text-decoration: none; text-align: center; } #nav a:active { display: block; height: 26px; width: 90px; background-color: #dfdede; font-family: trebuchet ms; font-size: 12pt; color: #000000; text-decoration: none; text-align: center; } #nav a:hover { display: block; height: 26px; width: 90px; background-color: #dfdede; font-family: trebuchet ms; font-size: 12pt; color: #000000; text-decoration: none; text-align: center; } .searchbutton { background-color: #28221b; border: 1px solid #94897d; padding: 1px; color: #ffffff; font-family: verdana; } #main { float: left; width: 578px; height: 800px; padding: 10px; background-color: #dfdede; border-right: 1px solid #afafaf; border-left: 1px solid #afafaf; } #sidebar { float: right; width: 279px; height: auto; padding: 10px; background-color: #cbcbcb; border-right: 1px solid #afafaf; border-bottom: 1px solid #afafaf; } #footer { clear: both; width: 880px; margin:auto; height: 20px; text-align: center; padding: 10px; font-family: verdana; font-size: 10pt; color: #000000; } #post-top { width: 580px; font-family: georgia; font-size: 24pt; color: #000000; } #post-middle { width: 580px; } .equal { display:table; border-collapse:separate; } .row { display:table-row; } .row div { display:table-cell; } .row div { } .row div.one { width: 580px; padding: 10px; } .row div.two { width: 278px; background: #cbcbcb; border: 1px solid #afafaf; border-top: none; padding: 10px; } HTML Code... <!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" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-type" content="text/html;charset=UTF-8" /> <title>Portfolio Design</title> </head> <body> <div id='header'> <div id='wrapper'> <div id='search'> <form name='search' target=''> <input class='search' type='text' /> <input class='searchbutton' type='submit' value='Search' /> </form> </div> <div id='logo'></div> </div> </div> <div id='nav'><a href='index.php'>Home</a></div> <div id='mwrapper'> <div class="equal"> <div class="row"> <div class="one"> <div class="slideshow" style='margin: auto; clear: both; margin-top: 90px;'> <ul class="recentlist"> <li><a class="current" href="#slide1">1</a></li> <li><a href="#slide2">2</a></li> <li><a href="#slide3">3</a></li> <li><a href="#slide4">4</a></li> <li><a href="#slide5">5</a></li> <li><a href="#slide6">6</a></li> <li><a href="#slide7">7</a></li> <li><a href="#slide8">8</a></li> <li><a href="#slide9">9</a></li> <li><a href="#slide10">10</a></li> </ul> <p id='slide1'> <img src="images/designs/design1.png" alt="Design 1" /> <span class='info'> <span style='font-size: 20pt;'>Design 1</span><br /><br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sed venenatis ipsum. Nunc id nulla orci, eget mollis purus. Proin vulputate suscipit dignissim. Sed euismod dui a lectus molestie lobortis. Integer tempus lobortis erat, sit amet mollis velit porta a. Nulla quis convallis eros. Morbi sodales porttitor arcu, in interdum nisl laoreet et.<br /> <br /><br /> <a href='#'>View Design</a> </span> </p> <p id='slide2'> <img src="images/designs/design2.png" alt="Design 2" /> <span class='info'> <span style='font-size: 20pt;'>Design 2</span><br /><br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sed venenatis ipsum. Nunc id nulla orci, eget mollis purus. Proin vulputate suscipit dignissim. Sed euismod dui a lectus molestie lobortis. Integer tempus lobortis erat, sit amet mollis velit porta a. Nulla quis convallis eros. Morbi sodales porttitor arcu, in interdum nisl laoreet et.<br /> <br /><br /> <a href='#'>View Design</a> </span> </p> <p id='slide3'> <img src="images/designs/design3.png" alt="Design 3" /> <span class='info'> <span style='font-size: 20pt;'>Design 3</span><br /><br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sed venenatis ipsum. Nunc id nulla orci, eget mollis purus. Proin vulputate suscipit dignissim. Sed euismod dui a lectus molestie lobortis. Integer tempus lobortis erat, sit amet mollis velit porta a. Nulla quis convallis eros. Morbi sodales porttitor arcu, in interdum nisl laoreet et.<br /> <br /><br /> <a href='#'>View Design</a> </span> </p> <p id='slide4'> <img src="images/designs/design4.png" alt="Design 4" /> <span class='info'> <span style='font-size: 20pt;'>Design 5</span><br /><br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sed venenatis ipsum. Nunc id nulla orci, eget mollis purus. Proin vulputate suscipit dignissim. Sed euismod dui a lectus molestie lobortis. Integer tempus lobortis erat, sit amet mollis velit porta a. Nulla quis convallis eros. Morbi sodales porttitor arcu, in interdum nisl laoreet et.<br /> <br /><br /> <a href='#'>View Design</a> </span> </p> <p id='slide5'> <img src="images/designs/design5.png" alt="Design 5" /> <span class='info'> <span style='font-size: 20pt;'>Design 5</span><br /><br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sed venenatis ipsum. Nunc id nulla orci, eget mollis purus. Proin vulputate suscipit dignissim. Sed euismod dui a lectus molestie lobortis. Integer tempus lobortis erat, sit amet mollis velit porta a. Nulla quis convallis eros. Morbi sodales porttitor arcu, in interdum nisl laoreet et.<br /> <br /><br /> <a href='#'>View Design</a> </span> </p> <p id='slide6'> <img src="images/designs/design6.png" alt="Design 6" /> <span class='info'> <span style='font-size: 20pt;'>Design 6</span><br /><br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sed venenatis ipsum. Nunc id nulla orci, eget mollis purus. Proin vulputate suscipit dignissim. Sed euismod dui a lectus molestie lobortis. Integer tempus lobortis erat, sit amet mollis velit porta a. Nulla quis convallis eros. Morbi sodales porttitor arcu, in interdum nisl laoreet et.<br /> <br /><br /> <a href='#'>View Design</a> </span> </p> <p id='slide7'> <img src="images/designs/design7.png" alt="Design 7" /> <span class='info'> <span style='font-size: 20pt;'>Design 7</span><br /><br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sed venenatis ipsum. Nunc id nulla orci, eget mollis purus. Proin vulputate suscipit dignissim. Sed euismod dui a lectus molestie lobortis. Integer tempus lobortis erat, sit amet mollis velit porta a. Nulla quis convallis eros. Morbi sodales porttitor arcu, in interdum nisl laoreet et.<br /> <br /><br /> <a href='#'>View Design</a> </span> </p> <p id='slide8'> <img src="images/designs/design8.png" alt="Design 8" /> <span class='info'> <span style='font-size: 20pt;'>Design 8</span><br /><br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sed venenatis ipsum. Nunc id nulla orci, eget mollis purus. Proin vulputate suscipit dignissim. Sed euismod dui a lectus molestie lobortis. Integer tempus lobortis erat, sit amet mollis velit porta a. Nulla quis convallis eros. Morbi sodales porttitor arcu, in interdum nisl laoreet et.<br /> <br /><br /> <a href='#'>View Design</a> </span> </p> <p id='slide9'> <img src="images/designs/design9.png" alt="Design 9" /> <span class='info'> <span style='font-size: 20pt;'>Design 9</span><br /><br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sed venenatis ipsum. Nunc id nulla orci, eget mollis purus. Proin vulputate suscipit dignissim. Sed euismod dui a lectus molestie lobortis. Integer tempus lobortis erat, sit amet mollis velit porta a. Nulla quis convallis eros. Morbi sodales porttitor arcu, in interdum nisl laoreet et.<br /> <br /><br /> <a href='#'>View Design</a> </span> </p> <p id='slide10'> <img src="images/designs/design10.png" alt="Design 10" /> <span class='info'> <span style='font-size: 20pt;'>Design 10</span><br /><br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sed venenatis ipsum. Nunc id nulla orci, eget mollis purus. Proin vulputate suscipit dignissim. Sed euismod dui a lectus molestie lobortis. Integer tempus lobortis erat, sit amet mollis velit porta a. Nulla quis convallis eros. Morbi sodales porttitor arcu, in interdum nisl laoreet et.<br /> <br /><br /> <a href='#'>View Design</a> </span> </p> </div> </div> <div class='two'> </div> </div> </div> <div id='footer'>Design and Code &#169; 2009 Matt Hobbs, All Rights Reserved</div> </body> </html>
  12. This is my first ever vexel drawing. I have never done anything like this with Adobe Photoshop before...so I thought I would give it a try. I thought I would share it with you guys... Sitting Hope you like it.
  13. Heya there, I have a slight problem...I have coded a simple jQuery image gallery, but the thing is...I want to add some text as well in <p> tags. to go along the side of the image. I was just wondering how I would do this. The jQuery for this is... $(document).ready(function() { var imgWrapper = $('.slideshow > img'); // only show the first image, hide the rest imgWrapper.hide().filter(':first').show(); $('ul.recentlist li a').click(function () { if (this.className.indexOf('current') == -1){ imgWrapper.hide(); imgWrapper.filter(this.hash).fadeIn(500); $('ul.recentlist li a').removeClass('current'); $(this).addClass('current'); } return false; }); }); The html for this is... <div class="slideshow" style='margin: auto; clear: both; margin-top: 90px;'> <ul class="recentlist"> <li><a class="current" href="#slide1">1</a></li> <li><a href="#slide2">2</a></li> <li><a href="#slide3">3</a></li> </ul> <img id="slide1" src="http://www.incg.nl/blog/2009/simple-slideshow-with-jquery/example/slide-1.gif" alt="Image 1 slideshow" /> <img id="slide2" src="http://www.incg.nl/blog/2009/simple-slideshow-with-jquery/example/slide-2.gif" alt="Image 2 slideshow" /> <img id="slide3" src="http://www.incg.nl/blog/2009/simple-slideshow-with-jquery/example/slide-3.gif" alt="Image 3 slideshow" /> </div> If anyone could help out that would be great, thanks in advance.
  14. I manage to solve this by doing some further research into MySQL queries. All I had to do was to make sure my tables in the database were a certain datatype, and then change two fields in the table so that they could do fulltext. Thanks for the help anyway.
  15. But you can always echo the " by adding a slash like \" or you could use the ' for the attributes, as it works just as well such as echo "<a href='#'>Test</a>";
  16. I am creating my own blog system using PHP, and I have come across a problem. I have started to implement a tagging feature into my system. I have got it so that it displays the tags, separately underneath the post in full view, as a link to a search page. The tags are stored in the database like so... tag1, tag2, tag3, tag4 etc... The search page shows the posts that have been tagged as the the name of the tagged they clicked on, such as search.php?tag=web%design. However, when I test this out with the below search statement, it returns nothing. $sql4 = "SELECT * FROM `posts` WHERE `tags`='$tagname'"; $res4 = mysql_query($sql4)or die(mysql_error()); Is it possible to search within the 'tags' field in the database, and display the results depending on what tag they have clicked on, such as they click on 'web design' and they get all posts that have the 'web design' tag. If anyone could help out, that would be awesome. Thanks in advance. P.S. I didn't know if this should go in the PHP or MySQL section, but this forum seemed the most appropriate one.
  17. I am just wondered if it is possible to get the time from the users pc, (as in there PC Clock), using PHP? If it can be done, how would it be done? If not, what else would I be able to use to get it? For all people that help out, thanks in advance.
  18. There are no parent divs to those that are shown. All of the CSS and HTML provided is connected to the problem, and is not affected by other divs. I have uploaded the page online... Link
  19. Heya, I have a div that is sort of a 'feature' thing at the bottom of the web page. However, the problem that arises that even though I have set it to 'bottom: 0;', it does not entirely line up with the bottom of the page. It leaves about a 20-30px gap at the bottom of the page. I have already tried 'position: absolute' and 'position: fixed' for the '#feature' div, and they have both been unsuccessful as they push the div up to the other content. Here are the pieces of codes involved... #feature { width: 100%; height: 300px; background-color: #38362c; bottom: 0; border-top: 2px solid #8c8a80; margin-top: 40px; } #designs { width: 900px; height: 300px; margin: auto; margin-top: 30px; } .latest { width: 266px; height: 96px; background-color: #000000; border: 2px solid #cccccc; float: left; margin-left: 20px; } .latestinfo { width: 260px; height: 90px; font-family: georgia; font-size: 1.2em; text-align: left; color: #cccccc; float: left; margin-left: 20px; padding: 5px; } <div id='feature'> <div id='designs' align='center'> <div class='latest'></div> <div class='latest'></div> <div class='latest'></div> <div class='latestinfo'></div> <div class='latestinfo'></div> <div class='latestinfo'></div> </div> </div>[/html] If anyone could help, I would be truly thankful.
  20. You could always use a simple zip program like winrar to zip up the files with a password, in which the user can be given when they enter their username password.
  21. Try putting "a4376893_yourusername" for the connection username, and then your mysqlpassword. Sorry, forgot to mention in my last post not to past your password.
  22. Change "root" to your username (if you are not the full owner of the site), and also enter a password after the root as it is just "", which means that there is no password provided to connect to the database.
  23. I have tried that already, but it still displays the same way in the textarea. I have also tried stripslashes as well.
  24. I am in the process of building a comment system for my website, however I have come across a problem. I can get the comments displaying correctly when they are submitted to the database, but when I try to echo them out in the textarea they do not display properly. I will try and explain it below... Say if the user typed in the textarea the following... Hello, I do like this... ...My name is bob. But if the user get's an error when submitting the form, it will not display like that when it is echoed out again, it will be something like this... Hello, I do like this...\n\n\n\r\n\n\n\r...My Name is bob. It would display all in one block. So how would I be able to echo it out again just as the user typed it in the first place? Thanks in advance.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.