Script47 Posted July 20, 2013 Posted July 20, 2013 Hello fellas, once again I created a mod, this one a lot more simple. Basically what it is a way for members to win money/crystals with a 50/50 chance. This mod was asked to be created by Brodiep. All blank echo's on my original code are "<br/>" on here it messes up, so you may want to update it on your version of the code. Although a Pastebin link has been added too now. 50/50 Pastebin * Maximum cash 5K * Maximum crystals 100 I can adjust these if you wish. *Remember* You need to add this page link where ever you want it. Page Link: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 5050.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Tell me what you all think about it. :) Thanks. Quote
sniko Posted July 20, 2013 Posted July 20, 2013 (edited) This system could be enhanced by; Not using inline styles Defining each bet limit as a constant/variable Removing the unneeded echo commands Actually validating the bet as a numerical value, then saying it's needed to be numerical Seperating the SQL from the database commands Removing the useless HTML from the top of the file Replace deprecated tags (<b></b>) As its 50/50, the chance isn't 50/50, see below Adopting the header class, to finish the page off, see below However, a nice addition :) http://codepad.org/QF0S4fUU You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Edited July 20, 2013 by sniko Quote
Script47 Posted July 20, 2013 Author Posted July 20, 2013 (edited) This system could be enhanced by; Not using inline styles (Done) Defining each bet limit as a constant/variable (Done) Removing the unneeded echo commands MWG Error. Actually validating the bet as a numerical value, then saying it's needed to be numerical (Done) Seperating the SQL from the database commands I don't get what you mean, could you please explain? Removing the useless HTML from the top of the file (Done) Replace deprecated tags (<b></b>) (Done) As its 50/50, the chance isn't 50/50, see below (Done) Adopting the header class, to finish the page off, see below (Done) However, a nice addition :) http://codepad.org/QF0S4fUU You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Finally, some constructive criticism. Thanks, I will update the code as soon as with some of them changes, thanks for your feedback mate. However I don't get number 3 on your list :) Edited July 20, 2013 by Script47 Updated List Quote
Guest Posted July 20, 2013 Posted July 20, 2013 Finally, some constructive criticism. Thanks, I will update the code as soon as with some of them changes, thanks for your feedback mate. However I don't get number 3 on your list :) Line 56 and 57 are the useless ones :) Quote
Dominion Posted July 20, 2013 Posted July 20, 2013 Line 56 and 57 are the useless ones :) Also 85, and 95. It may be MWG messing up again. It did this when Guest posted an modification a while back as well. Quote
Script47 Posted July 20, 2013 Author Posted July 20, 2013 (edited) Line 56 and 57 are the useless ones :) Also 85, and 95. It may be MWG messing up again. It did this when Guest posted an modification a while back as well. I think it is that, because it's fine on my actual source code. Edited July 20, 2013 by Script47 Quote
Dominion Posted July 21, 2013 Posted July 21, 2013 I think it is that, because it's fine on my actual source code. Post it at an external link as well e.g. Pastebin. Quote
Script47 Posted July 21, 2013 Author Posted July 21, 2013 Post it at an external link as well e.g. Pastebin. Added link, code is now through Pastebin as well. :) Quote
Shaddy Posted July 22, 2013 Posted July 22, 2013 This system could be enhanced by; Not using inline styles Defining each bet limit as a constant/variable Removing the unneeded echo commands Actually validating the bet as a numerical value, then saying it's needed to be numerical Seperating the SQL from the database commands Removing the useless HTML from the top of the file Replace deprecated tags (<b></b>) As its 50/50, the chance isn't 50/50, see below Adopting the header class, to finish the page off, see below However, a nice addition :) http://codepad.org/QF0S4fUU You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Hello, I don't think <b> and <i> are deprecated anymore. This article http://www.impressivewebs.com/bold-italic-html5/ will clarify that. Quote
Script47 Posted July 22, 2013 Author Posted July 22, 2013 I use <b> mainly because I learn't that first, but if people want me to use <strong> I haven't got a problem with that. :) Quote
Djkanna Posted July 22, 2013 Posted July 22, 2013 Depending on your doctype, b tags aren't deprecated, so b is perfectly fine. Quote
Jigsaw Posted August 5, 2013 Posted August 5, 2013 (edited) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. There's no point of that You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Overall its good. Edited August 5, 2013 by Jigsaw Quote
Script47 Posted August 5, 2013 Author Posted August 5, 2013 (edited) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. There's no point of that You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Overall its good. I know you could do it like that. I like to have my code spaced out, personally I feel it helps with the readability. Edited August 5, 2013 by Script47 Quote
Barrikor Posted December 20, 2013 Posted December 20, 2013 Also remember that <b> and <strong> aren't the same tag. Voice readers that blind people use will treat <b> as just styling on the page, and say the word like normal text. <strong> is actually for words in a sentence that you want to emphasize strongly, so that's what voice readers do when they read over them. If you put your navigation bar or a paragraph of text in <strong> it will sound ridiculous. Of course there's also CSS' font-weight:bold; too. Quote
Script47 Posted December 20, 2013 Author Posted December 20, 2013 Can you update the pastebin? :) Updated, check OP. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.