Web Dev Questions That Don't Need Their Own Thread v4
5,001 replies, posted
[QUOTE=Moofy;42215561]I like to challenge myself on a different level from what others might do.[/QUOTE]
Well then enjoy failing. As you've mentioned yourself, you don't even know where to start - I think that's a pretty good indicator that it's too difficult for you.
For my first project in php I decided to make a site with a user database, a large mongodatabase, loads of customization and more.
The result is an awful looking site with 4600 lines of php code, broken <head> tags inside the <body>•on every page, 4000 unique openid logins, the #1 spot on google for my keywords and an average of 25 concurrent users at any time.
I'd say you can go for it and should start by dissecting another wordpress plugin.
You will likely need to use <form> tags
[QUOTE=Moofy;42215561]I like to challenge myself on a different level from what others might do.[/QUOTE]
You're probably going to pick up a lot of bad habits if you start learning more PHP by developing WP plugins. You should learn how to write good clean object oriented code first.
Also, obligatory you should learn Ruby instead comment.
Apparently the wifi here blocks my post from being loaded for edit so I'll add that you'll likely do a lot of stuff that is regarded as being bad or dumb, thankfully you can always remake things and I've corrected most of my issues in the second version of my site which I'm currently testing.
[QUOTE=Dorkslayz;42215607][B]Well then enjoy failing[/B]. As you've mentioned yourself, you don't even know where to start - I think that's a pretty good indicator that it's too difficult for you.[/QUOTE]
Eerh.. Well if I sit down and tell myself that I will fail I won't go anywhere would I? Of course I didn't say I wouldn't start with doing something simple, I'm saying my final goal is to make it WORK with Wordpress, and where should I start off? I go, and ask devs. On Facepunch, however instead of receiving help to my essential goal I get pushed into "Well you will fail" - And of course I will get replied to with "we did help you, we told you to start making a contact form outside WP" and yes, you did. But I also told you that even if I did that, I didn't get any respond to how to get started making it work with Wordpress did I? Its just a small task.
[editline]16th September 2013[/editline]
Sorry for my hostility, but I'm having a motherfucking bad evening. And all I really need is some understanding, and HELP with what I wan't to do with my life. [sp]which is coding.[/sp]
[QUOTE=Moofy;42215960]Eerh.. Well if I sit down and tell myself that I will fail I won't go anywhere would I? Of course I didn't say I wouldn't start with doing something simple, I'm saying my final goal is to make it WORK with Wordpress, and where should I start off? I go, and ask devs. On Facepunch, however instead of receiving help to my essential goal I get pushed into "Well you will fail" - And of course I will get replied to with "we did help you, we told you to start making a contact form outside WP" and yes, you did. But I also told you that even if I did that, I didn't get any respond to how to get started making it work with Wordpress did I? Its just a small task.
[editline]16th September 2013[/editline]
Sorry for my hostility, but I'm having a motherfucking bad evening. And all I really need is some understanding, and HELP with what I wan't to do with my life. [sp]which is coding.[/sp][/QUOTE]
Okay then, we're trying to help you by saying that you shouldn't start with something so difficult. If you're sure you want to make something that works with wordpress then make a simple plugin, not something difficult.
Start with looking at other wordpress plugins, example plugins, wordpress documentation, etc.
[QUOTE=Dorkslayz;42216046]Okay then, we're trying to help you by saying that you shouldn't start with something so difficult. If you're sure you want to make something that works with wordpress then make a simple plugin, not something difficult.
Start with looking at other wordpress plugins, example plugins, wordpress documentation, etc.[/QUOTE]
No, I'm taking your word for it and I'm now making a form just with doing a <form> in HTML and making it work with PHP, I found some sort of "tutorial" that I look at when I get stuck or I don't understand anything but I always feel like cheating that way because I'm just following some guide, also not knowing if I should place everything I'n a single file or not.
[QUOTE=Moofy;42216086]No, I'm taking your word for it and I'm now making a form just with doing a <form> in HTML and making it work with PHP, I found some sort of "tutorial" that I look at when I get stuck or I don't understand anything but I always feel like cheating that way because I'm just following some guide, also not knowing if I should place everything I'n a single file or not.[/QUOTE]
You shouldn't really look at a guide of how to do it completely. The good thing with PHP is that it's so popular, so the search engines will serve you with everything you need just by searching for "html forms [B]PHP[/B]". You'll probably end up seeing a stack overflow question that only explains the basic steps to you while you have to figure out the rest. That's probably the fastest way of learning the very basics.
[QUOTE=Svenskunganka;42216250]You shouldn't really look at a guide of how to do it completely. The good thing with PHP is that it's so popular, so the search engines will serve you with everything you need just by searching for "html forms [B]PHP[/B]". You'll probably end up seeing a stack overflow question that only explains the basic steps to you while you have to figure out the rest. That's probably the fastest way of learning the very basics.[/QUOTE]
I've realised, what I googled was that and I got to [URL="http://www.1stwebdesigner.com/tutorials/custom-php-contact-forms/"]this[/URL].
When scrolling a bit down to the PHP (because I know hot to make a form) I see..
[code]1
<?php $name = $_POST['name'];
2
$email = $_POST['email'];
3
$message = $_POST['message'];
4
$formcontent="From: $name \n Message: $message";
5
$recipient = "emailaddress@here.com<script type="text/javascript">
6
/* <![CDATA[ */
7
(function(){try{var s,a,i,j,r,c,l,b=document.getElementsByTagName("script");l=b[b.length-1].previousSibling;a=l.getAttribute('data-cfemail');if(a){s='';r=parseInt(a.substr(0,2),16);for(j=2;a.length-j;j+=2){c=parseInt(a.substr(j,2),16)^r;s+=String.fromCharCode(c);}s=document.createTextNode(s);l.parentNode.replaceChild(s,l);}}catch(e){}})();
8
/* ]]> */
9
</script>";
10
$subject = "Contact Form";
11
$mailheader = "From: $email \r\n";
12
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
13
echo "Thank You!";
14
?>
[/code]
Now, I know this is probably the easy PHP but I'm trying to look for a bigger understanding before I actually place the code, even messing around with it is not neccesarily helping me understanding. Maybe I do realise "Oh hey if i change this, it does this" but I don't know why it does, because in my head it just DOES. And that's a wrong way of learning IMO.
[QUOTE=Moofy;42216323]I've realised, what I googled was that and I got to [URL="http://www.1stwebdesigner.com/tutorials/custom-php-contact-forms/"]this[/URL].
When scrolling a bit down to the PHP (because I know hot to make a form) I see..
Now, I know this is probably the easy PHP but I'm trying to look for a bigger understanding before I actually place the code, even messing around with it is not neccesarily helping me understanding. Maybe I do realise "Oh hey if i change this, it does this" but I don't know why it does, because in my head it just DOES. And that's a wrong way of learning IMO.[/QUOTE]
Or you just select the [URL="http://php.net/manual/en/tutorial.forms.php"]third one[/URL] in the list that goes to the [B]official php manual[/B]
[QUOTE=Svenskunganka;42216365]Or you just select the [URL="http://php.net/manual/en/tutorial.forms.php"]third one[/URL] in the list that goes to the [B]official php manual[/B][/QUOTE]
I'll just scootch back in my chair very casually as I read this, thank you.
[QUOTE=Moofy;42216323]I've realised, what I googled was that and I got to [URL="http://www.1stwebdesigner.com/tutorials/custom-php-contact-forms/"]this[/URL].
When scrolling a bit down to the PHP (because I know hot to make a form) I see..
[code]
<?PHP
$stuff->involving("mail()");
?>
[/code]
Now, I know this is probably the easy PHP but I'm trying to look for a bigger understanding before I actually place the code, even messing around with it is not neccesarily helping me understanding. Maybe I do realise "Oh hey if i change this, it does this" but I don't know why it does, because in my head it just DOES. And that's a wrong way of learning IMO.[/QUOTE]
Try PHPMailer or Swiftmailer instead of the [URL="http://www.websitebaker.org/topics/problems-sending-mails.php"]mail()[/URL] function.
So I have been using the Owasp reform class for php, and I like it.
But I seem to be stuck.
It doesn't like the Danish characters, so is there a way to turn something like this 'æ' to this 'æ'?
[editline]Later[/editline]
Ok
It actually converts them to: æ
So what would I need to do to convert them back to letters?
[editline]Even later[/editline]
I think I should just stick to htmlentities()
I'm doing codecademy's HTML basics course (because... why not) and I'm completely stuck in this exercise. I don't get what I'm doing wrong here, and a bit of googling didn't give me a solution.
the exercise is:
[QUOTE]To get warmed up:
Make the heading have the font family Garamond and the color red.
Add an image!
Add a second image which is clickable and links to a site. (Check the Hint if you don't remember how to do this.)[/QUOTE]
my code is:
[code]<!DOCTYPE html>
<html>
<head>
<title>Table Time</title>
</head>
<body>
<h1 style="font-family:garamond;font-color:red;">Tables Are Mega Sweet</h1>
<img src="http://25.media.tumblr.com/tumblr_lyzxndJXwp1qf04sko1_500.gif"/>
<a href="www.jerkcity.com/jerkcity5181.html"><img src="http://www.jerkcity.com/jerkcity5181.gif"/></a>
</body>
</html>[/code]
and it gives me the error "Oops, try again! Make sure your <h1> header has the font-family Garamond!"
[QUOTE=latin_geek;42223708]I'm doing codecademy's HTML basics course (because... why not) and I'm completely stuck in this exercise. I don't get what I'm doing wrong here, and a bit of googling didn't give me a solution.
the exercise is:
my code is:
[code]<!DOCTYPE html>
<html>
<head>
<title>Table Time</title>
</head>
<body>
<h1 style="font-family:garamond;font-color:red;">Tables Are Mega Sweet</h1>
<img src="http://25.media.tumblr.com/tumblr_lyzxndJXwp1qf04sko1_500.gif"/>
<a href="www.jerkcity.com/jerkcity5181.html"><img src="http://www.jerkcity.com/jerkcity5181.gif"/></a>
</body>
</html>[/code]
and it gives me the error "Oops, try again! Make sure your <h1> header has the font-family Garamond!"[/QUOTE]
I think you have to have Garamond in single quotes
[code]
<h1 style="font-family: 'garamond', serif; font-color:red;">Tables Are Mega Sweet</h1>
[/code]
[QUOTE=latin_geek;42223708]I'm doing codecademy's HTML basics course (because... why not) and I'm completely stuck in this exercise. I don't get what I'm doing wrong here, and a bit of googling didn't give me a solution.
the exercise is:
my code is:
[code]<!DOCTYPE html>
<html>
<head>
<title>Table Time</title>
</head>
<body>
<h1 style="font-family:garamond;font-color:red;">Tables Are Mega Sweet</h1>
<img src="http://25.media.tumblr.com/tumblr_lyzxndJXwp1qf04sko1_500.gif"/>
<a href="www.jerkcity.com/jerkcity5181.html"><img src="http://www.jerkcity.com/jerkcity5181.gif"/></a>
</body>
</html>[/code]
and it gives me the error "Oops, try again! Make sure your <h1> header has the font-family Garamond!"[/QUOTE]
It may just be a bug in their exercise, try reversing the order of font-family and font-color.
I have a form with an input that is supposed to check weather or not a username already is in a database
How would I get jquery to do stuff when something is inserted in that textbox?
[QUOTE=gokiyono;42232394]I have a form with an input that is supposed to check weather or not a username already is in a database
How would I get jquery to do stuff when something is inserted in that textbox?[/QUOTE]
[code]
$(yourInputSelector).change(function() {
// do stuff
});
[/code]
The handler will be called when the input changes - in this case, when the user types or erases anything within it.
Is there any good alternative to jquery's .css?
Say I want to add "box-shadow:0px 0px 5px red;andsomething:else;" what would I do?
So I finally caved in and bought a VPS, my plan is to have nginx forward requests onto the different websites I run, the main 2 I want are a jenkins CI builder and my personal site.
Is there anythin I can read up on about how to keep it secure/vps master guide?
[QUOTE=gokiyono;42232394]I have a form with an input that is supposed to check weather or not a username already is in a database
How would I get jquery to do stuff when something is inserted in that textbox?[/QUOTE]
You should make it so that jquery only does stuff 2-4 seconds after the user stops typing.
Or else you'll have a mess that will put off users and do some calculating for nothing.
[QUOTE=01271;42237134]You should make it so that jquery only does stuff 2-4 seconds after the user stops typing.
Or else you'll have a mess that will put off users and do some calculating for nothing.[/QUOTE]
100-200 ms is usually fine for debouncing stuff that runs when people type.
Is it wrong to make websites out of CSS templates that are Creative Commons Attributed 2.5 license where the website's goal is to make a profit? This website designer's website is using a CSS template (oh christ) and it seems like a seedy business practice to do so. Is he allowed to do this? Not to be a shit-disturber, but just wondering.
[QUOTE=RoflKawpter;42245030]Is it wrong to make websites out of CSS templates that are Creative Commons Attributed 2.5 license where the website's goal is to make a profit? This website designer's website is using a CSS template (oh christ) and it seems like a seedy business practice to do so. Is he allowed to do this? Not to be a shit-disturber, but just wondering.[/QUOTE]
[url]http://www.tldrlegal.com/license/creative-commons-attribution-(cc)[/url]
looks fine to me.
[QUOTE=RoflKawpter;42245030]Is it wrong to make websites out of CSS templates that are Creative Commons Attributed 2.5 license where the website's goal is to make a profit? This website designer's website is using a CSS template (oh christ) and it seems like a seedy business practice to do so. Is he allowed to do this? Not to be a shit-disturber, but just wondering.[/QUOTE]
As long as he gives attribution and (in case he does) shares it with the same license, he's on his right. It gives you permission to use it for commercial works.
[URL="http://creativecommons.org/licenses/by-sa/2.5/"]http://creativecommons.org/licenses/by-sa/2.5/
[/URL]--
Can anyone give me the hour?
[URL]http://creativecommons.org/licenses/by/2.5/[/URL]
This here says yes.
[B]Edit:
[/B]
I should refresh the page before answering next time.
i have a couple of buttons that transition to have a border on top when pressed and they just end up pushing down whatever below it. blah blah blah expected behavior, but how do i do make it NOT do it?
[QUOTE=/dev/sda1;42248959]i have a couple of buttons that transition to have a border on top when pressed and they just end up pushing down whatever below it. blah blah blah expected behavior, but how do i do make it NOT do it?[/QUOTE]
Check the margin/padding on the element/border.
Question might not go here, but since it has something to do with HTML I'll give it a go.
Does anyone know if buying a title on FP and linking it adds a underline on the link, because my current title is a link and I don't recall me styling it so it doesn't have any text-decoration. Maybe the preview just adds the underline to demonstrate it's a link but I don't know so I would just like to make sure.
[QUOTE=/dev/sda1;42248959]i have a couple of buttons that transition to have a border on top when pressed and they just end up pushing down whatever below it. blah blah blah expected behavior, but how do i do make it NOT do it?[/QUOTE]
transition a negative bottom margin in at the same time, or make the border always the same width but transparent when it's not active so that it doesn't move at all when it comes in.
Sorry, you need to Log In to post a reply to this thread.