Jump to content

Yawa

Members
  • Posts

    18
  • Joined

  • Last visited

Everything posted by Yawa

  1. It's a good point, and I've thought about it though. I have a layout which stacks the "bricks" horisontaly for mobile devices. But decided not to use it - because I didn't want to re-build the grid, and break the overlay thing, at that point. I was just finished with my layout - which used 960 grid with fixed width values. I would say "no" to your question - when I started. I really didn't care much about mobile users of this particular site. I'm not going to call up businesses and have them have a look at my site - on their mobile phone. And I didn't thought a business would use their phone looking for a webdesigner, or for some marketing materials either, when they sat at their office. That was my thought when I started. But I could be wrong about this, and of course - there's exceptions. I might reconcider not having a mobile version of my site. But just out of curiosity; Does every site has to be prepared for mobile device?
  2. Thanks gristol. I think it'll do for now - while I'm working on the portfolio and gallery pages... Although I really like the color tones of the backgrounds, I'm still a bit worried about the contrast. - Is the text readable enought? Will a colorblind person have any problems perhaps? - What about a person with impaired vision? Is the text OK to read? (font/size/letter spacing/line height) Any thoughts regarding that?
  3. I've just created a new design for my business site. I'm happy with the layout, but the color scheme - I'm not so sure. I wanted a minimalistic design that stands a bit out - Something different than these A4 standard sites you find all over the place. http://www.kiledesign.noI've coded the site by my selv. Using jQuery and jQuery Tools for the overlays. What do you guys think? The site is in Norwegian btw.
  4. you could try something like this: <? $current_time = date(G); if ($current_time >= [start] || $current_time < [end]) { // Display your image here } ?> Read more about using date()-function here : http://no2.php.net/manual/en/function.date.php
  5. is replacing " with ' valid html for id=" ", class=" " etc. when using echo " "; ? just wondering since I always use echo ' '; becaus of that...
  6. So the speed difference that i mentioned, that MySQL was faster than PostgreSQL, isn't that noticeable? The only reason I'm asking is that I want's to make sure that it loads the results as fast as possible AND that the security-options are in place. (need to learn them offcourse). If I have other quersions regarding PosgreSQL, like using multible users for SLQ-activities and tips - should I start a new post?
  7. Hi - In another post I ask if MySQL was the right choice for large amount of data and I was adviced to tak a look into PostgreSQL. I have read a bit an have got understanding that MySQL is faster and that PostgreSQL was slower. Another thing that was mentioned was that PostgreSQL was more complex/advance? I'm building an marketing website for businesses. Let's say that I have 100 000+ businesses that uses 7 tables to store all of the data (main, employees, services, references, news, comments, ratings). Toghether thats a lot of data - right? Is PostgreSQL a better solution?
  8. Hello - I want's to implement Google maps on a website. It's an advertising- and marketing -site for businesses and consumers in Norway and I'm trying to add a map to their profile and Ads. I'm wondering on two things here: #1 how to change a markers location and save it - and #2 how to show multiple markers based on results from a database. But one thing at a time... When a business, or a consumer, register a profile and has entered an address, a suggestion is made based on the stored address. If the suggestion is wrong - the user can moved the icon to the correct location and save it (or update it). I'm thinking the solution here is to fetch the latitude/longitude somehow, and store it in a database. When a user moves/drags the icon to another location - it stores the values into two hidden <input>-fields and uploads/updates it with PHP when submitted by user. Here is my .JS-script I'm using to show the map in each profile at the moment: var geocoder; var map; function initialize() { geocoder = new google.maps.Geocoder(); var myOptions = { zoom: 12, navigationControl: true, scaleControl: true, mapTypeControl: false, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById('businessLocation'), myOptions); codeAddress(); } function codeAddress() { var address = document.getElementById('address').value; geocoder.geocode ({ 'address': address }, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location }); } else { alert("Geocode was not successful for the following reason: " + status); } }); } And here is the 'address' <input>-field: <input id="address" name="address" type="hidden" value="'.$get['adressStreet'].', '.$get['adressCode'].' '.$get['adressCity'].', Norway" size="32" /> As you can se, I'm using Geocode to convert a human readable address (that is stored in a database) into lati-/longitude, to center the view and place the marker. What I'm basically asking for here is how to store a markers location, after it has been dragged, so everybody sees the correct location? Is there someone who knows about this stuff an can share some knowledge?
  9. Yes - I'm using Bluehost at the moment - and they do support PostgreSQL. I looked at postgresql.org very fast and it looked ok. But to be honest I'm not using MySQL for no particular reasons, don't really know a lot about it other than that i can store information in tables and fetch it out when needed for creating dynamic webpages. That I've done a lot, so I'm familiar with the setup and querying etc. What is the main difference between the two? Is it the storing, the performance, the security or what? Is it hard to convert/move stored data from MySQL to PostgreSQL? Know of any good tutorials? thanks for answers?
  10. hehee, okay - so that does not seems to be any problem... hehee I read the "MySQL Performance / Optimizing Queries" sticky thing here, and it was 3 years old - still up to date?
  11. Okay - so is there any limitations on how many rows a table can have? For the performance in query-time for example?
  12. I'm building a website for businesses to create a profile for them selves plus that they can add ads and other stuff. The same thing goes for individual persons too - creating ads. I'm talking about several thousands maybe... The thing is that i does not know for sure that the best way to go is using MySQL database - But doesn't know of any other way to store information either - beside flat-files (not really know how that works). If you wanna stor A LOT of data, what type of storing engine is preferred?
  13. What I want is to let visitors select a county they want to search in. And when the choice is made - all ads, news, info that is shown is from the chosen county. What I'm trying to say here, is that when a location is set, visitors don't need to set the location again. But they can change it all the time. I belive this is done by setting a cookie with PHP. But don't know how. Can anyone point me in the right direction?
  14. I thought i had used "desc" before. but it turned out that I have had the same problem then. I changed it, and now it works perfectly fine. Thank's for the tip.
  15. it is very strange because. I have set up this script right above. and it works quite ok: if (isset($_POST['submit_upl_img'])) { if (!val_img($_FILES['img']['name'], $_FILES['img']['tmp_name']) || !val_alt($_POST['alt'])) {} else { $sql_ext = mysql_real_escape_string($fileext); $date = mysql_real_escape_string($_POST['date']); $alt = mysql_real_escape_string($_POST['alt']); $album = mysql_real_escape_string($_POST['album']); $query = sprintf("INSERT INTO gallery_picture (ext, date, alt, album_id) VALUES ('$sql_ext', '$date', '$alt', '$album')"); $result = mysql_query($query); if (!$result) { $err = 'OBS! Something went wrong when writing to the database'; } else { $filename = mysql_insert_id(); $query = mysql_query('SELECT * FROM gallery_picture WHERE id = "'. $filename .'"'); $getfi = mysql_fetch_assoc($query); if (!create_thumb($getfi['album_id'], $getfi['id'], $fileext, $_FILES['img']['tmp_name'])) { mysql_query('DELETE FROM gallery_picture WHERE id = "'. $filename .'"'); $err = 'OBS! Something went wrong when uploading the prictures.'; } else { $ok = 'Picture was uploaded successfully ID: '. $getfi['album_id'] . $getfi['id']; } } } } else {} Togehter with all the functions... I tried to put the functions and the script in another document. but the problem is still there. I tried to create a new table in the database with no luck. So i'm stuck here. By the way, I have set up several others querys later that works fine. The same way. can't see the difference between them. I could post them if that would help... My host is bluehost.com. They couldn't help me with programming questions
  16. I use sprintf() because of the mysql_real_escape_string(). Isn't that correct? Always used this method. Is ther a better/another way? This is what i got printet out, and it seems correct. INSERT INTO album (date, name, desc) VALUES ('2010-05-04', 'Testing', 'Testing...') I have used these names in other tables aswell, never been a problem. I have several scripts in the same document. But i have done this for lot of documents. In my whole backend
  17. I get the $err msg. in my script. But I can't seem to se the problem my self. Can you fint it? if ($_POST['submit_new_album']) { if (!val_alb_name($_POST['name'])) {} else { $date = mysql_real_escape_string($_POST['date']); $name = mysql_real_escape_string($_POST['name']); $desc = mysql_real_escape_string($_POST['desc']); $query = sprintf ("INSERT INTO album (date, name, desc) VALUES ('$date', '$name', '$desc')"); $result = mysql_query ($query); // Her stopper det tipper jeg if (!$result) { $err = '[NOR]Beklager, men en feil oppstod ved skriving til databasen'; } // Here is the error-message i get. else { $ok = '[NOR]Ett nytt album er blitt opprettet for deg: '. $_POST['name']; } } } else {} And here is the form: <?php include ('/path/to/script/gallery.php'); ?> <h1>[NOR]Opprett ett nytt album</h1> <p><?php print '<strong><span class="green">'. $ok .'</span><span class="red">'. $err .'</span></strong>'; ?></p> <form name="new_alb" method="post" action="?gdc=galleri&funksjon=nytt-album"> <table> <tr><td></td><td><input name="date" type="hidden" value="20<?php print date ('y-m-d'); ?>" /></td></tr> <tr><td>Album-navn:</td><td><input name="name" type="text" size="80" /></td></tr> <tr><td></td><td><textarea name="desc" cols="80" rows="5" ></textarea></td></tr> <tr><td></td><td><input name="submit_new_album" type="submit" value="opprett"/></td></tr> </table> </form> I'm using mySQL.
×
×
  • 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.