Mordent
Members-
Content Count
424 -
Joined
-
Last visited
Everything posted by Mordent
-
Just a little note: I'd highly recommend using lowercase tags ("td" instead of "TD"), simply because it's then valid XHTML. HTML will most likely be slowly rendered redundant over time, meaning XHTML is the markup language that will make little things like that add extra hassle for you in the future. Same with colspan, really. You need to put some quotes around the 4 to make it XHTML compliant. Not really an answer for you, but XHTML is overall one hell of a lot easier to debug. Take at look at w3schools sometime.
-
You forgot one important thing in that little list: the number of credits you want to transfer. Unless of course you plan on sending them one at a time, or something, but anyway... I roughly know Feelay's tutorial on profiles, although I lack the effort to go and have a look. From what I remember, though, he's done a tutorial on sending private messages (PMs / mail) to other users? If so, the idea of sending credits is far more simple. Basically all you're doing (ignoring the part where people receive credits, which would work in whatever way you see fit) you just need to do the following (in steps, not code, because I'm lazy and it gets you thinking rather than copying/pasting): present the form once user has clicked "send" check the input fields (i.e. sanitise and validate any that need doing, so no sending of negative credits, all the inputs completed etc.) access the database make sure the user has enough credits to send make sure the receiving user exists deduct that many credits from the user, add them to the credits of the receiver display a message so the user knows There are a lot more substeps of course, but it should get you thinking.
-
Er...that sounds like a problem that most people don't encounter.Did your internet connection die during the transfer? No other reason why it wouldn't have worked? If not, I'd suggest trying it again (from scratch) and see if you can get it working again. Quite honestly, that sounds far more like a FileZilla/connection problem than anything to do with SMF.
-
Right, so you've got FileZilla working and connecting to your site? I'm guessing you have (else this is just a question of getting FileZilla working), and can navigate through your site's folders in the directory tree on the right? Firstly, you need to work out where you want to install SMF. Let's say your domain is foobar.com, and you want it so that whenever someone goes to foobar.com they see the forum. In this case, you'll be wanting to install it in home/<your username>/public_html/. If you want it in a subdomain instead (so something like forum.foobar.com) you need to set that up first (if that's the case let me know and I'll go in to more detail). If you want it in, for instance foobar.com/forum (or something similar, basically in a subfolder of your main domain) you need to create the relevant folder(s). Again, if you need to know where you're supposed to create them just let me know, I'm assuming you're a "complete newbie" (your words, not mine ) at pretty much everything and over-explaining rather than not explaining enough, so that other people can learn a little as well. So, once you've identified which folder you need to install it in you can go and get SMF itself. SMF comes in several different packages, although in each box (despite the fancier ribbons of some, and chains of others depending on what unzipping software you have) lies the same thing: the SMF software. The three options are .zip, .tar.gz and .tar.bz2. To my knowledge, each of the three contains exactly the same thing, but caters for users of, say, Linux who may not be able to open .zip files and so on. Now, what makes me at least a little confused is why you're using the SMF 2.0 Beta, as it even says in big red letters under it that: I can't really help you with the intricacies of 2.0, as I've never used it myself. Personally, I'd whole-heartedly suggest using SMF 1.1.6, as I can vouch for it being a fine piece of software that will do more than meet the needs of most forum admins. Anyway, the rest of my little guide is assuming that you're using 1.1.6, although I suspect a fair amount of it will be relevant for 2.0 I can't guarantee it. Once you've downloaded the compressed file (whatever format it's in) you need to uncompress it. Basically you want to turn smf_1-1-6_install.blah so that you've got a folder called smf_1-1-6_install on your local computer, with all of the pretty files within it etc. Open that folder and admire the pretty piece of software, go on, you know you want to! So, everything in that folder needs to be uploaded (although not the folder itself) in the folder you worked out you need to put it in earlier. Open up FileZilla, connect to your site via FTP and navigate so you can see both the empty folder on your site (possibly with a folder called cgi-bin in it, depending on which one you settled on - you can leave that there) and the contents of the smf_1-1-6_install folder on your local computer in it. To my knowledge, SMF needs no changes locally before you upload it. Click on any one of the folders or files and press Ctrl+A to select them all. Then right click and select "Upload" (or "Add Files to Queue", in this case it won't make much difference as long as you know how to start the queue processing). The transfer will begin so that a copy of each of those files/folders appears on your site. Now comes the fun bit: CHMODing. This link should explain any points I miss, so best you read that if you haven't already. Why do you need to do it at all? SMF needs to alter a few of the files so that it runs on your site, such as settings and any folder where users can upload, say, avatars. In FileZilla you can easily change the permissions of files/folders already uploaded by right clicking on them and going to File Attributes. In the case of SMF, each file/folder listed below needs to have all permissions (777). Everything else can remain at the default permission level (755). That's uploading taken care of, you've done your share of the hard work. Time to let SMF do the rest and install itself. Navigate to wherever you installed SMF to in your web browser (Firefox all the way ) and the install.php file. For example, if you uploaded it to http://forums.xisto.com/no_longer_exists/ then type in http://forums.xisto.com/no_longer_exists/install.php in the address bar and hit enter. Once there (assuming no horrid error pops up about permissions and whatnot) you just follow what it says on screen, filling in whatever it tells you to and so on. If you reach a snag here then just say so and I'll likely walk you through it as well. Hope that solved your problems! - Mordent
-
Online Multiplayer Game What language to learn in order make it?
Mordent replied to iGuest's topic in Programming
Wrong on so many levels, I'm afraid. Java and JavaScript are two different things entirely. Yes, the page has JavaScript in it, but JavaScript is code that your browser runs. All of the pages that I had a look at were PHP files (i.e. *.php), meaning that they use PHP code to do the business on the server itself. Some handy links: HTML PHP JavaScript These are by no means the only useful pages on the subjects, just the ones I have bookmarked. -
Just as a comment to anyone thinking of installing Black & White (the original), I'd definitely recommend getting the v1.1 patch (available in loads of places, such as here). While I've never encountered any of the problems with the bugs it apparently fixes, having the option of skipping the tutorial once you've gone through it once is an absolute godsend. That alone makes it worthwhile, in my opinion.
-
Heh, I hadn't actually noticed Spybot had updated to v1.6 fairly recently (8th July). Odd, considering when I ran Spybot just now it updated automatically, yet didn't do so any of the other times I'd ran it between when the update was out and now. Weird... Anywho, aside from that, I've never had any problems with Spybot S&D doing its job. It's also one of the few anti-spyware programs that my university allows (the others being McAffee Anti-Spyware and LavaSoft Ad-Aware) to qualify your computer for internet access. Saying that, there really aren't that many other decent anti-spyware programs out there, are there?
-
*idly considers trying to find a way of getting an MP3 file to play on startup* Who doesn't want to wake up to the sound of whatever band they favour at the time blaring through their PC speakers? Seriously, I'm useless at getting up when my alarm goes off, and short of taking a trip to ThinkGeek to find some innovative way to guarantee I get out of bed, this sounds like a pretty viable alternative - especially considering I'd have to get up to stop WMP from playing, as I always have it on repeat.
-
Technically Portsmouth (south coast), but anywho...the only reason I pointed it out was because online games can take an absolute age to get through, so being in the same timezone helps one heck of a lot. It takes even longer if both players try and go about it the Good way. There's only so many nice things you can do to each others' villages! I'm tempted to restart the game again (deleting my profile and my creature) and going through so that I'm personally Good, while my creature is a thing from the deepest pits of Hell. It's a pretty nice combo, your creature trashes everything (getting you Belief) and you put it back together again (getting yet more Belief). The problems start when you have to train your little critter up, though, as to teach him the, say, Fireball miracle and what you want him to use it on you've got to torch a few villages yourself. Still, you can always win back your Good status by applying liberal Heals afterwards, if you care so much about that. I just get all annoyed when I'm trying to play a good deity and end up accidentally killing some random villager to have my Good conscience have a rant at me. "Oh come on, it's not like I did it on purpose!" I might just tell both of my consciences to go stuff it, letting me do what I feel like at the time.
-
Well, just dug it out and spent pretty much all of yesterday playing it. Yeah, this looks like it could well be a rapidly worsening trend. So anywho, aside from the fact that my ape's pretty small and useless at the moment, I haven't played online for a long time. I've restrained myself to cease playing it all today as well, so much the better, but we'll see how well my will holds out. The main problem I have with the game is that it takes forever to get your creature to any appreciable size. I remember when I used to play it online (and this is after a good few solid weeks of playing) that everyone else's creature was the maximum size, simply because the creature never shrinks. Once the veterans have got their creature huge, they can pretty much trash anything they like with it. One variation I had great fun with is agreeing to play with entirely new creatures. Namely we did the very first part of the tutorial until the creature selection and then went straight to an online game. You wouldn't believe how much I yelled at my computer screen when my... I think it was a tiger, started trashing my village of his own accord. Of course, glancing over at my opponent he was having about as much fun as me trying to control his little blighter. The creature's a great way to convert villages outside of your influence, but damned if he can be a stubborn bugger at the start. But anywho, once I'm back from my holiday (headed away for two weeks) and got settled back in to uni I'll give you a game sometime. I notice you're from London, which saves the timezone trouble a little. This all assumes I don't manage to get annoyed with the irritating little ape in the meantime. It's so hard to be good, I'd have to agree. Curse the temptation of the fireball!
-
Works fine for me, looks like you just needed a little while for the nameservers to update.
-
Ah, fond memories...I'm seriously tempted to go dig it out myself, now. Anyway, I haven't played it in ages but it's still a brilliant game. I've also played B&W2, and you'd be right that there's more of a battle theme. Basically, rather than having your creature do all of the general destruction you can train your villagers up as soldiers etc. I never got past the first few lands in the second one, mainly because it's not actually my game so I didn't get to spend all that much time on it. They also took out the multiplayer element, which I figure was a bad bad move. There's nothing quite like trashing the villages of your friends or, even more entertaining, watching their villages convert to you as their reign of terror makes your utopian society look tempting indeed. It's always embarrassing when they lose to a pacifist. Still, definite fun times with the original, the second isn't as revolutionary as the first (obviously), so although it's a good bit of fun to play I tend to prefer the multiplayer aspect of the original. Now, if you'll excuse me, I've got to go rummage through some boxes of old games.
-
The wheel's not compliant to modern standards, it needs to be stripped back down to basics and rebuilt to your exacting needs. I'm not all that fussed about compacting HTML, but that's just me. My site's not currently meant to be...well, at all big. Anyway, after much googling and the like I found near-perfection in a simple little idea here. Taking his ideas apart and putting them back together again so I understood exactly what was going on was really useful and got me brushing up on my object-oriented code again. Sure, I changed it a fair bit, but that basic framework let me do pretty much exactly what I wanted and separating my function from my display. It's not as nifty as Smarty, and you do give any template designers free reign to do what they want with PHP, but as both roles are taken up by me at the moment I'm not too worried about that.
-
I'd always felt the same way about keeping HTML and PHP separate, but never really looked in to ways of doing it to such a full extent. I'll have a look at template engines (although knowing me I'll insist on writing my own ), and - just for reference - I never use WYSIWYG editors. Everything I do I create from scratch, which means I know what's going on to a decent extent.I realise whitespace is ignored by pretty much everything when it comes to web development, which is always useful. I'll admit to not being aware that you could get things to display in the way you showed above, so that's something new I've learned.Right, time to go look at these here template-engine-thingamajigs.
-
Whenever I start a new project one of the first things I do is put in a base index.php page. Yes, it's a .php file, but I won't be looking at the PHP just yet. Normally, it looks a little something like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://forums.xisto.com/no_longer_exists/ xmlns="http://forums.xisto.com/no_longer_exists/; xml:lang="en" lang="en"> <head> <title>Title</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="style/reset.css" /> <link rel="stylesheet" type="text/css" href="style/base.css" /> <link rel="shortcut icon" href="images/favicon.ico" /> </head> <body> </body></html>I've already got a few basics set out that I tend to stick to. For instance, so far each of my projects has been XHTML Strict, which is why it's always up there. Similarly, I use the same character set, and (at least initially) have two CSS files called reset.css and base.css stored in a subdirectory called style. This all looks lovely and so on, but then I start to add some PHP in as time goes on, and in order to keep the indentation looking right I have to put weird number of tabs in to my echos etc. Then I get a stage where I want to call the same function in different sheets, each one needing a different number of tabs to make it so that when you view the source it's easy to read. So, I've been thinking, what if I didn't indent? That'd make the above page look like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://forums.xisto.com/no_longer_exists/ xmlns="http://forums.xisto.com/no_longer_exists/; xml:lang="en" lang="en"><head><title>Title</title><meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /><link rel="stylesheet" type="text/css" href="style/reset.css" /><link rel="stylesheet" type="text/css" href="style/base.css" /><link rel="shortcut icon" href="images/favicon.ico" /></head><body></body></html>Is that so hard to read? In a decent HTML viewer (still working on getting Firefox to open up any View Source requests in Notepad++, if you know how to do let me know) it's all correctly coloured, has groupings around the open and close tags, etc. This makes a clear distinction between HTML (i.e. no indentation) and PHP (where I indent my code as normal). That makes creating the site a lot easier, surely, as anything that's indented is code, anything that isn't is HTML. Normally I'm a big advocate of indentation, but when two different things are running parallel in one document having two different levels of indentation just doesn't look easy to read to me and never has. Any thoughts on how you'd do this? Just as an example document, how would you indent the following PHP file? <?php$foo = some_function();$bar = some_other_function('foo');if ($foo > $bar){another_function();}?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://forums.xisto.com/no_longer_exists/ xmlns="http://forums.xisto.com/no_longer_exists/; xml:lang="en" lang="en"><head><title>Title</title><meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /><link rel="stylesheet" type="text/css" href="style/reset.css" /><link rel="stylesheet" type="text/css" href="style/base.css" /><link rel="shortcut icon" href="images/favicon.ico" /></head><body><h1>Heading 1</h1><div><?phpif ($foobar == 'blah'){echo '<p>BLAH!</p>';}?></div></body></html>I would post how I'd normally do it, but I'd like to see what the general consensus on indents is while I think about it a little.
-
Css Minus The <p> A very newbie CSS question
Mordent replied to Animator's topic in Websites and Web Designing
Fixed it for you (you'd used an open <span> tag instead of a close </span> tag). Anyway, aside from that I've personally no problem with tinkering with the <p> tag if it gets me what I want. <p> and </p> are used for paragraphs. By default each paragraph goes on to a new line, so in terms of keeping to the general standards I leave it like that. For special formatting within paragraphs (i.e. emphasising sections) you can use <em> and <strong> tags. Although you can get a lot nicer results from using certain class spans (e.g. <span class="emphasis">foobar</span>) I've never had a problem with using <em> (and potentially customising it a little) to get the result I want. That said, I'm often very fussy with my CSS, and I keep all sense of styling out of the (X)HTML document. This means I have great fun playing with classes and whatnot, as I have to give them relevant class names (class="bold" brings style back in to the markup, which I want to avoid). Anyway, in general you should use tags which are right for the area you're working in. Use <p> if it's a paragraph, use <td> if it's a table cell, etc. You can style these individually using CSS without too much hassle, and it's always best to use the right tag in the right place than one that you can make look right. Just for reference, I barely ever use <br />. Hope this helps in general. -
You know how lorries have that bar at the back? The one that's lower than the back of the actual...*doesn't know the word*...trailer? That's there so that when a car hits it the bonnet takes the impact like in a car-on-car collision, as opposed to the windscreen. With this car, you don't even get a windscreen to save you. Your face is the crumple zone against lorries. But yeah...I'll pass on that one, thanks. Nifty, but it's not really useful other than for breaking a record...or, as mentioned above, your face.
-
What I Learned About Dark Knight movie review
Mordent replied to JohnNitro's topic in Websites and Web Designing
I agree to some extent. It had several spots where it could have quite happily ended, but I suppose there's nothing wrong with getting more for your money. Either way, I still think the sequel is pretty nicely set up for. -
Hmmm, that seems to work pretty nicely. You're right about the width being wrong still, but that's something I'm either going to have to live with or to make it some silly value. Honestly, I don't get why they don't just make the widths sort themselves out properly, but ah well.Nice one on the margins, though, thanks a bundle!Just as a quick update, however, I'm thinking about changing the layout of that part of the site anyway, but it's still a good learning experience. Cheers again.
-
Linky Tadaa! I'll leave it to someone else to expand on that, as I haven't the time. Hope that helps, however.
-
Right, I'm going through the joy of designing forms: something that makes a lot of web developers cringe. Now, I'm going about it using CSS. Some people say tables, but quite frankly I'm not going to get in to that argument here. I'm using CSS. Stubbornness on my part aside, I've now got to deal with the stubbornness of my forms. Let me show you the problem: As you can see, it looks all lovely until the submit button. It's a little to the left, and (if you look at it carefully) a little narrower than the text fields. Here's my CSS for the relevant area: /* form formatting */fieldset { display: block; margin: 1em; border: 1px solid #888888;}legend { margin-left: 1em;}label { float: left; width: 8em; text-align: right;}input { margin-left: 1em; width: 10em;}input[type="submit"] { margin-left: 10em;}As far as I can tell, no other area of the CSS should really influence this. The possible exception would be (as you'll see in a minute) how I'm handling lists: ul { margin: 1em;}It's also worth me noting that I'm using a "clean slate" for my CSS. Basically I use a separate CSS called reset.css which effectively removes all preconceived ideas that the browser has about how it should lay things out. Anyway, on to the important things... Here's my HTML for this form. <form action="login.php" method="post"> <fieldset> <legend>Login Details</legend> <ul> <li><label for="username">Username</label><input type="text" name="username" /></li> <li><label for="password">Password</label><input type="password" name="password" /></li> <li><input type="submit" name="login" value="Login" /></li> </ul> </fieldset></form>As you can see, it's nothing special. I use lists to allow me to tamper with the styling of the inputs and whatnot while still being fairly semantically correct. If you've got advice on laying out forms do feel free to share it, but it really isn't my concern at the moment. So, now that all of the relevant stuff has been put on show, let me go through it. You'll note that the width of all input tags should be 10em. Similarly, the input fields (and the submit button) should line up: The text fields have a total of 1 (the ul) + 8 (the label width) + 1 (the left margin) ems worth of distance from them and the left border of the fieldset. The button has a total left margin of 10 ems worth of distance between it and the left border of the fieldset (correct me if I'm wrong, but the 1em margin of the ul wouldn't affect it, as 10 is bigger?) Last time I checked, 1+8+1=10. So, as a summary of the current situation, the input fields should be the same width, and should line up so that their left edges are in a vertical line. Clearly, however, they are not. So, after a bit of tampering, I discovered that adding 0.5em to the margin-left of the submit button (making it 10.5em) gets its left edge to line up with the others. Similarly, making its width 10.5em makes it the same width as the text fields. So...why does the submit button decide it needs another 0.5ems to do what the others do? It's not like 0.5em occurs anywhere else in all of my CSS (not just the extract I showed you)! Any help would be greatly appreciated, I don't like things just to work, I like to know why the work, too. Cheers! Mordent
-
Xml Needed? Is XML required for a text based game?
Mordent replied to Flamez's topic in Computer Gaming
Storing data in XML format is useful in certain cases, but a waste of time in others. I don't think there's any situations where XML data storage is "required" (namely that it can't be done another way). From personal experience, MySQL databases (and I would imagine other databases, although I've never tried them) work wonders for things such as text games.I'm starting work on actually turning my design draft in to reality for a game of my own, and I've no intention currently to use XML in terms of storing data. Naturally things will vary from project to project, but I won't be using it. Don't let that stop you from deciding for yourself, though, and as Darasen said you should certainly have a look for yourself at what XML can and can't do and whether it'd help you in your project. -
Hmmm, you're right. They don't work with Firefox 3.0 (pass as to 2.x, I haven't got it any more). IE seems to handle the CSS fine (I checked both browsers using W3Schools), which does make me wonder... Looking at the list of CSS properties (found here) I can't see anything do with the scrollbar on there. Perhaps it's something that IE supports that isn't a standard? It wouldn't surprise me, what with IE's stance on general web standards ("those things people keep mentioning? Yeah, we might look at them sometime when we're done doing stuff we want to do...").
-
What I Learned About Dark Knight movie review
Mordent replied to JohnNitro's topic in Websites and Web Designing
I'm still not convinced that Two Face "died". This is pure speculation, however, as I don't plan on ruining any part of the plot of the next film for myself or - indeed - the current film for anyone who hasn't seen it. If you haven't seen The Dark Knight yet and don't want snippets of the plot given away, stop reading now. :mellow:Still here?Well, in that case I'm of the opinion that, like the "death" of Gordon the "death" of Two Face, or - more importantly - the death of the public figure he was, was there to protect him in that any future actions of his as his new "bad-guy-persona" wouldn't have a negative effect on the city of Gotham. There are plenty of references to having to keep Harvey's record "good" throughout the film, and faking his death would mean he died as a "good" citizen while Two Face goes on to the next film.Again, purely speculation. I haven't looked for any evidence to (dis)prove my theory.