Everything posted by Sono Juventino
-
Font-face replacement in Opera
Wickham: Thank you. I've used the Fontsquirrel generator for different font-type, yes. If it look different from Arial, it's probably right. The site is still work in progress, so I'm aware of that some of the headlines are huge. This is how it should look for you. (clickable image) Good to hear the site is loading fast. For me, the fonts are loaded every time, causing huge load-time. I know the fonts are at fault. Tried renaming the font directory, and the page loaded nicely again. The font files are not cached properly. I think that's the problem. Any suggestions? Opera 10.63 for me to.
-
Font-face replacement in Opera
Hey I'm currently developing a site using Paul Irish's Bulletproof @font-face syntax Actually, my body text is currently set use a font-face that I've uploaded. It works fine in all browsers except Opera. Opera is loading for a very long time, and this is obviously making the site pretty unusable. Do anyone have a trick for this, or an hack for Opera browsers? It's currently far from finished, but how does this page load for you? Thanks for any help.
-
User registration script v1.0
Not to ruin this topic, but I think it makes sense to use three input fields. That leaves out trouble like date format and date syntax. (dd/mm or dd.mm etc. don't know if syntax's the right word)
-
User registration script v1.0
rallport: Again. Why use preg_replace when checkdate() is the perfect tool for the job? Cool jQuery though. I need something for birth dates. They are most commonly in the range of 1970-1990. Got anything that fits my needs better? PM me. Thanks
-
User registration script v1.0
//Filter everything but numbers 0-9 $birth_month = preg_replace("#[^0-9]#i",'',post_get('month')); $birth_day = preg_replace("#[^0-9]#i",'',post_get('day')); $birth_year = preg_replace("#[^0-9]#i",'',post_get('year')); Use checkdate instead: - Note that checkdate uses month, day, year for checking a date. You can of course still edit $date to your needs. The genius about checkdate is that it actually check for a REAL date. 30 February NEVER exist, and is therefor failing validation. So does .1, xx, 33, 99.99.999 and so on. // check date if (!checkdate((int) $_POST['month'], (int) $_POST['day'], (int) $_POST['year'])) { $errors[] = 'not a valid date'; } else { $date = $_POST['year'].-$_POST['month'].-$_POST['day']; }
-
How difficult is it to learn PHP?
Yeah, I know that know. I've learned a lot on coding PHP since that comment. I'm filtering content based on isset() and !empty() if so, I'm using mysqli_real_escape_string and strip_tags on text, ctype_digit() for numbers, checkdate() for dates and so on. If you want to learn PHP, I recommend VISUAL QUICKPRO GUIDE: PHP 6 AND MYSQL 5 FOR DYNAMIC WEB SITES by Larry Ullman. It's just f***ing great! Even if PHP 6 is not a stable release, you'll learn a lot from it. It teaches you all a noob would need to know of the basics. Best book I've come across on PHP.
-
How difficult is it to learn PHP?
I wrote "Please, please correct me if I'm wrong" for a reason. I asked you a question, and as a more experienced developer, you should educate instead of making a fool out of me. I will of course read about sanitising as I want to learn. What I'm trying to explain here is this: it would be better to list a couple of functions in php for sanitasion and filtering, link to good articles etc. As I've said before. I struggle to trust a lot of sources on PHP simply because I don't know the "best practices". A lot of articles seem outdated, and when I try to validate an opinion on how to do something, I often end up with several different answers. So, rallport: Please help a beginner out with a starting point for learning about this.
-
Date from input fields into MySql database
Clever. Thanks.
-
How difficult is it to learn PHP?
Wickham: Thank you very much. I will take a look right now. This seem to be perfect for what I want to achive! Regarding security: Is it just me, or do PHP developers tend to focus to much on protection the input code rather than determine what's allowed in the database? You won't be able to overwrite an ID as long as it is a primary key, set as unique or you are using foreign keys to keep data in different tables the same. For numbers, you only allow integers, and so on. Doing that, you won't have to think about escaping all your code. As far as I've understood so far, the problem seem to be varchar type or field types where you are allowed to use a lot of different characters. I understand that these need escaping, but my point being: Why not set up you DB a little better in the beginning? It will save you a lot of security tests. Please, please correct me if I'm wrong here. Password protection: I know. I will defiantly look into this if I ever plan on publishing some of my code. As for the time being, this is sort of a hobby project. I realize that once I've finished the first version of this code, I will probably rewrite it because I've learned during the coding. That is what I'm planning on.
-
How difficult is it to learn PHP?
Hey I'm struggling with resources for learning PHP. The manual is of course a great reference tool, but is there a resource explaining how you do explicit things? Like how to create a function for editing database input? I just can't read the whole PHP manual and figure it out function by function. What I would like to learn right now: I'm working on a form for adding football players to a database. That is simple. But how do I edit for example the player "Alessandro Del Piero" with a shirt number of 10 or an ID of "2"? I want to write a function where I can edit players through an url lik ...players.php/edit/id2 or player.php=edit?id2 Hope someone can help me out. Hopefully give me a link with lots of these hints and tips. Php security, best practices, ect. Something like a Smashing Magazine for PHP, that is up to date. All the sites I've fround seem a little outdated. Or maybe I should buy a book? Or an e-book? Any help is welcome!
-
Date from input fields into MySql database
planetabstract: Thank you very much. That did the trick.
-
Date from input fields into MySql database
Hey all Trying to add a date into a MySql database. $born ouputs the date in the right format, but it doesn't get sent to the database. All the other inputs is saved though. Why? The field born uses a date type HTML: <div class="row one"> <div class="legend"> <label for="born">Fødselsdato</label> </div> <div class="value"> <input id="day" name="day" maxlength="2" type="text" title="Legg inn dag" /> / <input id="month" name="month" maxlength="2" type="text" title="Legg inn måned" /> / <input id="year" name="year" maxlength="4" type="text" title="Legg inn årstall" /> </div> </div> PHP: $born = $_POST['year']."".$_POST['month']."".$_POST['day']; mysql_query(" INSERT INTO ... (born) VALUES( '$_POST[$born]' )") or die(mysql_error()); Hoping for some help.
-
Juventus Norge V4
DesignCommunication: 500-300 Unique Visitors each day. We are not a very large website. Lev: Thank you very much. Could you possibly explain shortly why you think our original design is better? Could you also point out the originals shortcomings and tell us what you didn't like about V4? We are always looking for ways to improve. Hoping for even more feedback.
-
Juventus Norge V4
Hello friends I would like some feedback on our new mock-up for our front page. Hope you can help us improve this further. Mock up: Juventus Norge V4: - The image below is click-able: Previous mock-up: http://dev.juvenorge.com/images/15.png Current website: http://juvenorge.com So... What do you think? Thanks in advance!
-
New layout for Juvenorge.com!
I've not experienced any problems yet, but I have a pretty good connection. How's the loading time for you? http://dev.juvenorge.com/
-
New layout for Juvenorge.com!
That's I concern I share with you. But is 485kb really that much for today's internett connections? That's the size of the background at the moment. If it is, and I'll run some test, maybe it could be possible to write I script to measure the connection speed and just serve it to those with a fast one? Anyhow, CSS and the image will be cached, so is it really that tough? I'm not an expert on this. Thank you very much for the kind words. I appreciate it.
-
New layout for Juvenorge.com!
Size matters. The images you are looking at are huuuge and are actually even larger than you can see here. For monitors over 1680px width like mine, the image will fade into the background with gradients. So sad the Buffon image is taken with Gli Azzurri though. Not sure I should use it as we are a Juventus fan site. But i love it.
-
New layout for Juvenorge.com!
The new layout for Juvenorge.com is finished. Current site: Juventus Norge Front page view: Full article view: Forum view: What do you think?
-
Do you use a grid system?
Yes, I try to use a grid when designing a layout. It was thanks to a forum user that I discovered the consistency your layout get when using a grid. Designing got a whole lot easier after reading some articles on the subject. I've never used a CSS grid system though. I just pay attention to it when using photoshop. I will definitely try to use blueprint when coding my next layout.
-
Php strftime troubles
Hey I'm currently struggling on how to use php strftime properly on a function I've written for a textpattern plugin. The problem is that the ways I've tried to use strftime have changed the output of the whole script. Could you please point me in the right direction? Url: http://juvenorge.com/gillan/adm/about/ The variable that needs strftime: $game_list[$i]['kickoff'] I've tried to add strftime these ways without success. 1. $game_list[$i]['kickoff'] = strftime($date_pattern, $kickoff) 2. strftime($date_pattern, $game_list[$i]['kickoff']) Note: Strftime actually work in both lines, but the variable $game_list is just printing the same date 5 times instead of the normal 5 different dates. Understandable? Please help a noob out. Full script // ################################################################ /* TAG: next game <txp:cnk_game_list /> */ // ################################################################ function cnk_game_list($atts) { global $prefs, $pretext, $s, $id, $title; extract(lAtts(array( 'league_id' => '1', 'date_pattern' => '%A %e/%m - %Y, Kl. %H:%M' ), $atts)); $q = "select a.kickoff_time as kickoff, a.club1_id, a.club2_id, b.name as klubb1, c.name as klubb2, d.logo as logo1, e.logo as logo2 from admcnk_soccer_games a inner join admcnk_soccer_clubs b on (a.club1_id = b.id) inner join admcnk_soccer_clubs c on (a.club2_id = c.id) inner join admcnk_soccer_clubs d on (a.club1_id = d.id) inner join admcnk_soccer_clubs e on (a.club2_id = e.id) where a.kickoff_time > now() order by a.kickoff_time limit 5"; $game_list = getRows($q); $out .= '<ul>'; if ($game_list) { for ($i = 0; $i <= count($game_list)-1; $i++) { $out .= '<img class="logo_1" src="../' . $game_list[$i]['logo1'] . '" alt="'.$klubb1.' logo" /> <img class="logo_2" src="../' . $game_list[$i]['logo2'] . '" alt="'.$klubb2.' logo" />'; $out .= "<li>" . $game_list[$i]['klubb1'] . ", " . $game_list[$i]['klubb2'] . ", " . $game_list[$i]['kickoff'] . "</li>"; } } else { $out .= "Ingen kamper lagt til"; } $out .= '</ul>'; return $out; }
-
Review Redesigned Website
Nicely designed site, but I'm not a big fan of your logo. Just didn't blend very well with the design, the cherries (i'm not a fruit expert) feels kind of random and... English's not my spoken language so I have some problems explaining it. But I'll try. Some site's displays other designs, but still keeps one single navigation bar at the top. This is kind of the feeling I'm getting here. That the logo just does not fit at all. It's nothing wrong with the navigation itself, but that is how the logo makes me think. I'm not getting the relation between cherries and Apple products. (Haha. Maybe it occurred to me as I wrote this ) But it still doesn't seem like the right logo for you. To me that is. Sorry for a bad explanation. Hope you did understand.
-
Dueling stoyboards.
I think the second ones are much more interesting.
-
Soccer plugin for Textpattern enhances
I have no knowledge in PHP, so I hope you can help me a bit. A plugin that allows me to create tables, show next opponent and such was created for me a time a go, but it has some minor flaws. In the tables, I would like a column for "games played" and in the admin section, each league should start counting on 1. Is this possible to achieve without to much hassle? 1. Games played. The table already displays $game_won, $game_drawn and $game_lost. It should be possible to just count all three for each team and print out games played, right? 2. Counting starting on one for each league No idea, but I hope you can help me. I know this may look like a small problem, but if a table's displayed wrongly it sometimes hard to know why. This is how rounds are currently numbered This is what I want to achieve: I don't really know what you need to help me with this problem, our if it's even a small job. I'm willing to pay something if this takes a lot of time, but this is not major problems. If you think this is too much work for a helping a random, please let me know, and I'll ask for this to be moved to the "looking for hired"-section. And please excuse my bad english. soccer.php
-
The new Rawkes is coming
Use the rocket to take you to a new planet when the navigation is clicked. That would be awesome.
-
Secuity Website Design
You are getting there. Looks much better already. I'm not quite sure about the blue in the header though. That's what make this site a bit boring at the moment.