Jump to content
xisto Community

rkage

Members
  • Content Count

    75
  • Joined

  • Last visited

Everything posted by rkage

  1. I'm not sure because I haven't used nor seen in action, WordPress. If it is customisable then it probably can be edited to make it XHTML Valid which shouldn't be too hard depending on how it is built.Just make sure certain tags are closed, replace <b>'s with <strongs> and all the rest, if it's not done so already.
  2. The thing about it is just habits. I still use the <b> and <i> tags out of habit. It was the only option when I was learning HTML and like everything you learn, you remember the first things the most. So I wouldn't go and try to revamp my pages right now and try and obey every XHTML rule there is, but rather start changing habits slowly. The <center> tag is a prime example. It is still acceptable to put it in paragraphs but is slowly being phased out. So from now on when you are creating a website, try not to use, think to yourself, how would I achieve this using CSS...then try gradually using <strong> and <em>. And so on and so forth. Just keep the rule in mind - Does this tag relate to the content, in which case use it in the XHTML, or am I trying to change how the content is displayed, in which case you should use CSS. I'll do another tutorial later about getting the most out of CSS, in which I will cover the styling aspect alot more. So until then just check out the website above, and its also in my sig. It's a great website that, although I wouldn't recommend it for beginners in HTML, i'd recommend it to intermediates and experts. Alot of the relatively unknown tags are very useful indeed. Kage Sorry, about the double post, I wrote the above post five hours ago but had to go out, I thought I'd sent it but when i got back I hadn't. Anyway, yes all browsers support CSS (although sometimes the look of CSS can vary across browsers...yes I.E. I'm looking at you ) and since XHTML is just a slightly expanded form of HTML, all modern browsers made in the past five years will support all the extra tags. You shouldn't need to worry about it anymore at all. Just build your page and either download Safari, Opera, FireFox, I.E. and view your site in those to make sure everything is displayed properly or post a screenshot of how it should look and ask those browser's users to compare. Notice from microscopic^earthling: Posts merged.
  3. Knowing what XHTML is set out to do You may think that coding your site to meet XHTML standards requirements makes you look as if you are keeping up with your web page but unless you know what XHTML job is, then you can look like a fool. For years, web browsers were designed to open one page and show it in a human understandable fashion. But, although not as well known, another mark up language has been floating around called XML. XML was made to separate what content there was, from how the content is meant to look. When you go to a site, you are looking for the content of the webpage, not to look at how it is laid out. But if the content is laid out neatly and professionally, the content is easier to read, isn't it? So using XML to hold the content and the XSL (stylesheet) to display the content literally separated HTML into two parts. Now the exact same content can be seen on PDA's, WAP enabled phones, satellite on TV's even old computers with different resolutions and software. It was, and is even more so, a great benefit. But if you ask billions of website owners to learn a new language and transform all their work to this new language, there is just no chance in hell. So they created an inbetween state XHTML which is meant to obey standards that relate to what XML is set out to be but also work on all browsers as normal HTML does. I Know How To Use It! Do you? If a user has visual difficulties does your website cater for this by allowing color changes and can the screen readers read out your site correctly? Can users with physical difficulties navigate your website without using a mouse? These may seem to be insignificant details but if you are going to obey XHTML, then obey it to its fullness. More users will be able to see your site without difficulties. So I am assuming you know what you need to do to validate XHTML such as lower case tags, doc type declaration, close all tags etc etc. So here are a few tags I never want to see again; Donts! <center> - Never use this tag. Use CSS to center the text in the parent tag. So, for example, if you have a table cell you want to have the text centered in, then your XHTML will be; <td>Centered</td> And your CSS; td { text-align: center;} <font> - Once again CSS does this job far more efficiantly, like the <center> tag, it is a waste of space. If you want the text in your cell to be Georgia, and it's size to be 12px, then you just easily update the CSS; td { text-align: center; font-family: georgia; font-size: 12px;} <iframe> - These don't work in alot of browsers and certainly dont work on many other devices. The main reason for this is people want the same banner and links on every page and this seems the easiest way to do this. If you've seen a frames site and you click on a link, it opens in the frame but the URL never changes, when in reality it should. But using CSS and a little PHP, iFrames may never, thankfully, be used again! Just put all the header information, banners and links in a PHP file called header.php. Then wherever you want that information displayed, use the PHP include function; <? php include('header.php'); ?> I'm pretty sure this is covered in depth in other tutorials so that's just a brief summary of better alternatives to iFrames. < color="#cc00ff"> - CSS does this and you know it does - same for bgcolor, border, width and other attributes. Putting them in with the "content" doesn't make sense.What tags to use? So in case you are confused to what tags to use, ask yourself this - Does this tag tell the browser information about the content or does it explain how to display the content? The <form> tag explains that a the following information is to be displayed in a form, so that is fine. The attributes for the form (method, action) also tell the browser how to handle the form, so they are perfectly acceptable (and there is no other choice around it anyway ) So yes, that means that tags like <b>, <u> and <i> are not welcome anymore and in a few years should be gone forever. Now to bold your text, you can use the preset tag <strong>, that makes the content strong and so it stands out. Most italicised text is styled like that because it they are emphasizing a point (Yeh that was pretty contrived...) so the tag <em> will emphasize the text inside and the default styling for the <em> tag is italics. And finally <u>. I think there is a tag to replace this but underlining text is generally only used for titles, links, abbreviations etc and so it is somewhat confusing to have randomly underlined text in a paragraph, as the user will try to hover over it and click. Of course, you still use CSS to style things when necessary. So if we wanted out text in the cell to be bolded, underlined and italicised, then we wouldn't do this; <td><u><b><i>Centered</i></b></u><td> Not only is that ugly and inefficient to write but it defeats the purpose. Are we emphasizing the cell? No, so we keep the same XHTML, and then we define how it looks in CSS. <td>Centered</td> Nicer code, eh? And I dont think I need to tell you not to use <blink> or <marquee>. Whoever jokingly put these tags in should be shot. What Tags Should I Use There is such a wide range out there, I can't name them all but here are a few - <p> - Still acceptable - use whenever you have a paragraph of information <quote> - A great tag when you are inputting source content that is not your own <ins>/<del> - Great tags for editorial pieces where you change articles from the past. See how these tags describe what the content is? That is what you should be aiming to achieve. How do I layout my page? First off, don't use tables for layout. Use divs (dividers) for layouts, far more efficient and flexible! Use tables for data such as member details. Secondly put your navigation links into an unordered list <ul>. That is effectively what navigation is, a list of links. So the XHTML might look like this; <ul id='navigation'> <li><a href='home.php'>Home</a></li> <li><a href='away.php'>Away</a></li> <li><a href='contact.php'>Contact</a></li></ul> Screen readers read these out properly. And as a last note structure your content wisely. Use heading tags (<h1>,<h2>...) effectively to split your content up. If you are using images ask yourself are they images assosciated with your content (in which case you just use the <img> tag) or are they images to increase the design aesthetics (this time you must use the background-image property of CSS). Following these rules might seem difficult at first but after a while, they become second nature and you don't even have to think about what you are doing. Your site will load faster and be far more accessible if you dont just stop at the XHTML validation rules, but go that one step further to what XHTML stands for! Just one more thing - HTML Tag Reference. Spend a while reading up on every single tag and what they are used for. In fact read that whole site when you get the chance. That is how XHTML should be. It will save you time and hassle in the future. So I hope you enjoyed this tutorial to some extent and I have inspired you, even in the slightest, to follow a few more rules when creating your next website. Take it a step at a time. Try replacing every <b> tag with <strong> until you get into that habit. Happy Web Designing Kage
  4. Sounds really cool, even if it isn't the most high tech game, it would be very interesting to build one because it would increase your knowledge of OOP and programming in general.I'm going to look into this! Thanks for the link...so is it like programming in C or PHP or what?And to the guy who said all the games were boring, if you take all the staff hired in a company who work ten hour shifts for about a year, to make a simple game. Now think of one guy or gal sitting in their home doing it for an hour a night, three nights a week, it won't be that spectacular.So I'm not really expecting to make the next Mario Brothers but it will still be a good programming adventure to go on!
  5. Thanks vujsa! I just remembered that I was using a different theme.So I carried out those commands and got a fatal error, so then I couldn't open any of the forum pages so i went and reinstalled the Subs file and now my shop is giving me problems...so fustrating.On a related note, the Shop MOD is really interesting and it is really simple to deploy new items that can annoy your members but also let them have so much fun. I created my own STEAL item which randomly guessed whether the steal was successful and if it wasn't the person trying to steal money lost theirs. And I was creating a button on the profile that you could click to steal their money, but now I can't...I just hope I dont have to reinstall the whole thing again!!
  6. LOL, I misread the title as CSS Website for Clan - meaning I thought you meant Cascacading StyleSheets as opposed to Counter Strike Source. I was about to eat you up for claiming your site was a CSS website!That being said, I can't say your website is great. I really hate the use of iframes with a passion. They are messy and very inaccessible. I also hate the use of tables for layout but that is the dowside of Photoshop.Basically I could build your website with 4 images, that would load faster. Now, I am not saying your website is great, I'm just stating that it is terribly inefficient. If you put your links as normal text with a background image of a repeated gradient, it will load up in seconds. I would recommend you reading into advantages and disadvantages of using CSS. Whe someone suggested you change the font to verdana or tahoma, with CSS you can do that by changing on word of text. In the ed it will save you time, bandwidth and alot of sore headaches.
  7. I see how you use templates, but I have never, and still don't see why I'd want to use them all that much. I program alot in PHP so the XML IF and FOR-EACH statements come as second nature to me and so I use them quite regularly.I tried making template one like you had suggested but I also got the error message. I'll look into the subject more because it has been a year since I learnt XML and even then I wasn't completely "in touch" with how it worked and how to use it to my advantage.
  8. I have the exact same problem, I set the options for the shoutbox and it says it is there, I just can't get it to appear!
  9. You are getting there and although your code is right, you are just using the wrong functions. There is more than one small photo so you have to use the for-each function as opposed to the match one. I think this is the rule and sure enough when I tried it, it worked. So here is the modified code; <?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform/; <xsl:template match="/"><html><body><xsl:for-each select="entry/small_photo"> <a><xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute> <img> <xsl:attribute name="src"><xsl:value-of select="@url"/></xsl:attribute> <xsl:attribute name="width">20%</xsl:attribute> </img> </a></xsl:for-each></body></html></xsl:template></xsl:stylesheet> So if this is like a blog type thing you are doing correct? Well, then you'll need to do a for-each loop to display each entry if you get what I am saying. "Matching" probably won't work. I'm pretty sure that's why your code didn't work, I just know that when you do the for-each loop, it definately works. Let me know if it solves the problem.
  10. I haven't been a fan of one board per category, it makes the board look unnecessarily big. Other than that it looks pretty good. One thing I would recommend is blending your banner into the layout more as it looks pretty isolated and the colours do look as if you are currently trying to change the boards colours and are half way through, they could also be blended in more since the two colours don't contrast well.
  11. Heres a website were you can search through the known digits of pi for your birthday, but I forget the website. Apparently alot of peoples appears but mine didn't.In a maths class this year we found out pi to 8 decimal places using a calculation, paper and a calculator. It was interesting for a while but then it got boring, because we all argued we could get that result by pressing the pi button. So we got a computer spreadsheet program and worked it to 32. I guess we should have got the extra seven so that our circle calculations were even more accurate eh?I forget what the formula was now but basically you start with a square and work out the circumference of the square, by finding each side of the square using the cosine rule and then multiplying it by four. Then a pentagon, hexagon and onwards and it slowly began to converge to pi.But 3.141592 is all the decimal places i need to remember and know, maybe 22/7 as a fraction as well, which is close enough to pi for everyday calculations.
  12. I've got quite the list;Maroon 5, Killers, Coldplay, U2, The Thrills, The White Stripes, Scissor Sisters, Creed, Puddle Of Mudd, Snow Patrol, Keane, Lost Prophets, Doves, Stereophonics, Franz Ferdinand, Embrace, Velvet Revolver, Linkin Park, Greenday, Guns N Roses (all time favourtie), Queen (2nd all time favourite), McFly (yeah I said it ).The reason I've got such a long list is because on any given day I could listen to any o their albums and not feel bored but not a lot of them bar Queen and Guns N Roses have songs which I could listen to 50 times in a row without boredom.When i'm in my pumped up mood doing excercise, it's Guns N Roses - Welcome to the jungle, Linkin Park, Lost Prophets, and Queen songs. When I'm depressed its Coldplay, Embrace or Keane. When I'm designing web sites it's the others. Just depends on what I am doing really. My favourite artist at the moment has to be Jamie Cullum and my favourite song ever, and still listen to it consistently, is november rain.
  13. I've got quite the list;Maroon 5, Killers, Coldplay, U2, The Thrills, The White Stripes, Scissor Sisters, Creed, Puddle Of Mudd, Snow Patrol, Keane, Lost Prophets, Doves, Stereophonics, Franz Ferdinand, Embrace, Velvet Revolver, Linkin Park, Greenday, Guns N Roses (all time favourtie), Queen (2nd all time favourite), McFly (yeah I said it ).The reason I've got such a long list is because on any given day I could listen to any o their albums and not feel bored but not a lot of them bar Queen and Guns N Roses have songs which I could listen to 50 times in a row without boredom.When i'm in my pumped up mood doing excercise, it's Guns N Roses - Welcome to the jungle, Linkin Park, Lost Prophets, and Queen songs. When I'm depressed its Coldplay, Embrace or Keane. When I'm designing web sites it's the others. Just depends on what I am doing really. My favourite artist at the moment has to be Jamie Cullum and my favourite song ever, and still listen to it consistently, is november rain.
  14. To answer a few questions, and to add input of my own... The whole XHTML conversion is bringing the HTML towards XML. The main focus is to concentrate on what the data is and not how it looks. If any of you have seen an XML file then you'll know it only contains data and it doesn't display anything in any special way. The reason fot his is the advancements in technology which means no longer is the internet available only to computers but to PDA's and mobile phones. They have to display that same data on a different screen and will not use the same rendering browsers as computers. Internet Explorer automatically closes some tags and what not which means a lot of website owners thought there site was completely fine but other devices, and other browsers displayed the pages like they got beat with an ugly tree. So the internet moved towards a more standards compliant code in which only the data was displayed and they had to follow a certain code. XML was working towards this goal so instead of completely destroying all current websites, they made XHTML which is read the same by most browsers. It now means that your code is more than likely gonna display the same thing in many browsers. The main advantage of XHTML is it's recommended integration with CSS. XHTML held the data and the CSS displays how the data should look so although it is NOT against the rules to include "bgcolor", "color" and "size" attributes as well as the <font> and <br /> tags, it does defeat the meaning of XHTML and what it's aiming for. Consider someone who has poor eyesight. Do they want to be squinting to read your tiny text, painlessly trying to stare past the glare or trying to make sense of your funky text? No, they want to be able to literally customise the appearance of the whole interent to suit their needs. Screenreaders for the completely blind, will read out well formed XHTML more sensibly than not formed. By styling your font or page layout in the actual XHTML, you remove this ability and, possibly, dissappoint people. Another advantage is that you get to describe how your website prints out on paper. Say you have loads of information on a subject, good quality information. It contains links to other passages on the same subject with "click here" links on it. When that is printed out and given to someone who may want to look up that information, what does "click here" mean? With XHTML, you give the links a title, and using CSS skills, tell the printer to print out the title beside the link along with the actual link. So although the tutorial was very informative, I considerably recommend you to not just follow the mandatory rules, but understand what XHTML is all about and make your site true so that in the future, your site will continue to work effortlessly. So although <font>,<br> and <hr> are technically still allowed, DONT use them because they do not contain any meaning other than for displaying purposes. Also use other tags that are not widely known, such as quote, code, definitions, abbr and acronym. If you want to read more go to http://www.htmldog.com/. Learn when to use the correct tags. Don't use tables for layout, only use them to display structured data. Put menu items into an unordered list as they are effectively lists of navigation links. Small things like that. XHTML is more flexible to all browsers because they will read it exactly the same. How they display it, is entirely different in relation to the browsers CSS support or lack of it. But making it valid XHTML will ensure your site is more accessible as it doesn't rely on the internet browser to be able to know how to close tags for you. And about the name and ID attribute question. Name is deprecating but it is nowhere near out of phase. If you are familiar to PHP when to find out the variable of a form input box you need name tag. I spent four hours debugging my PHP code to find out why it wasn't working only to find out that i hadn't given the input boxes a name, only ID. So my advice is to include both, since it doesn't do any harm. And lastly, to add a bit to the tutorial, XHTML must be well formed (nested) so if you open a bold tag, then an italic tag, you must first close the italic tag then the bold tag for valid purposes. <b><i>Hello</b></i> isn't valid. <b><i>Hello</i></b> is. To close with a related note, I made a mini site last month that worked on WAP on mobile phones. It was a pretty cool experiment to see the website on both a phone and a computer's browser.
  15. You can only choose from the default characters :none, disc, circle, square, decimal, decimal-leading-zero, lower-roman, upper-roman, lower-greek, lower-latin, upper, armenian, georgian and a few others i think. To do what you are trying to achieve you need to make an image of the two arrows and use the; list-style-image: url('raquo.png'); It isn't as easy to modify, say for example you wanted to change your size of font or color. You could use the pseudo element before; li{list-style-type: none;}li:before { content: "Âť";} That works in FireFox but it doesn't work in I.E. at least to my knowledge unless they've updated it.
  16. So in terms of hit and miss, they are a miss. Ah well, was just trying to bring about something different as opposed to the generic bulletin boards. And it does need alot of room for improvement, I only started it on friday night, I wasn't expecting two rows to be a finished layout.
  17. So to test my XHTML, PHP and CSS knowledge to da extreme, I have decided to build my own message boards from scratch! So you can rate them now and as I go, and any help and comments would be greatly appreciated. I may need some help but for the moment I am taking a few suggestions. If anyone has Opera or Safari, I'd like to know how the page looks as I can only test them in FireFox and I.E. The link of course is http://forums.xisto.com/no_longer_exists/ and I mean it when I say the boards do nothing yet. I have been focusing alot of my time into the layout and getting it to look the same in both I.E. and FF. So if you have any suggestions or tips for me good on ya and if you want to tell me what to include/not to include to make good forums then feel free. Maybe you all can visit once a week and see how it's going and tell me if there's something you don't like!
  18. I know how you feel and it is really hard to try to say something to help you because I have been in that position and I wouldn't except anything anyone was telling me, I wanted to be in a bad mood. My advice is to stick in there and listen to your friends because for five years I had not had one friend at all. None, I went out one night a week and that was it. A pretty boring period of my life to think my childhood was wasted like that.But then it all changed when a really dead on guy started talking to me and we had loads in common, everything we done, know matter how embarassing was funny and overnight we were comfortable hanging with eachother like we had known each other for years. He introduced me to his friends and because me and him were friends, I didn't care what others thought about me, I really did act like myself and his friends seen my humour and my personality and liked me.Then, he got a girlfriend and his older mate moved back to the town and all of a sudden I was and still am pushed away. We seen eachother the other week and we didn't even say anything to eachother. So all of a sudden we went from people who went on weekend spontaneous holidays with eachoter and someone I thought I'd cry my eyes out for ever if I lost as a friend to people who couldn't speal to eachother. The flare had gone.But the friends he introduced me to still talked to me and although they aren't as friendly with me as they were with him, they felt rejected as well and so we still hang around but I know I am not the humourous, relaxed person I used to be. But when people are feeling down, they like to talk to the serious people, not the clowns.So why am I telling you this? Because at one point in your life, things will change for the better and your personality will bloom. There will be someone who you will feel comfortable with be it a boy or a girl, and you'll feel more relaxed. I lost the best friend I've ever had and I don't feel down because I realise because of him, I have a better life than what it used to be and I'd dread if i went back to being what I used to be.I hope I help you feel a little bit better. Just remember, the person you are looking for to make you happy, is also looking for you.
  19. The funny thing is that the most famous logos don't have the most techincal graphics in them. Think of Mars Bar - red whiting with a gold outline on a black surface. Coca Cola - White joined up writing on a red background. McDonalds - A large yellow M on a red background...Make something unique especially if it is going to stand on it's own, but don't necessarily go over board. A good text logo is one where if you changed the text in it but kept the style, people would still recognise.
  20. There are some pretty cool CSS menus that create drop down effects and everything. The benefit to those are they work on nearly every computer and load instantly. Just a suggestion though. I know alot of my friends and even my school (for security reasons I dont understand) turns off Javascript and when they go to a website that uses menus with Javascript, they can't navigate if the site is poorly built and so they leave before they even have a look around.Personally, I find Javascript can be very useful but when put in the wrong hands, can be VERY VERY annoying.So think is it worth using Javascript if you could be sending one in every twenty of your visitors away simply because they can't access your site? And if you still want to use it, that's fine but put text links to all your pages at the bottom of your pages, at least that way some non-js users can still look around your site.
  21. Hopefully you have read my introduction to PHP and you are either thinking - "Wow, PHP seems really cool, I want to learn more!" or else "What's the point?" Both are valid thoughts. I am going to show you something that PHP is useful for and hopefully you will all be thinking the first thought. You may be familiar with the x letter in algebra if you have ever done maths. Tell me what the value of x is? You can't, because it doesn't have one. You must give it a value. You may also be familiar with the value of pi - 3.14159..... (and so it continues on to infinity). pi has a value and if you put it on a page and send it to China, the guy there will know exactly what it is even if you haven't said. So is x the variable or is pi the variable? it is x. Pi is a constant. x can have the value of 0,1, -34.4343434343 or infinity. It's value varies. OK so say you don't know alot about maths, let me explain it another way because the variables are the most important things about PHP in my opinion. It's your birthday today. You get a present. What does the present contain? You don't know! A present can be a car or a pair of underwear. The present is a variable. No suppose you got a PLaystation 2 for your birthday...well then you got a playstation 2 which is a ....playstation 2. It can't be a giraffe, it is a constant so to speak. So now that you know what a variable is, you must now know there are seven of them...just like the seven wonders of the world, the seven sins or the seven dwarves. Don't worry too much about what they mean just understand what the difference is. String - The most simplest one. Contains characters - literally a string of characters. eg. "Playstation 2", "giraffe". Integer - Contains a whole number that can be positive or negative. eg. "2", "-45", "0". Float - Contains decimal numbers and really big numbers. eg. "45.5555", "560,304,506,454,454,000" Boolean - Contains true or false that's all. Array - A complex variable that may contain other variables. Object - The most complex variable as it may contain other variables and it's own functions! So in this tutorial, I'll try and cover strings. You will use these the most so they are very important.! Strings! 1. Defining a variable! $present = "giraffe"; All variables contain the "$" sign whether it be arrays, strings or integers. The $ must be followed by a letter. It is also best to work constantly in lower case letters, you'll understand why later. So we create the variable and give it a value of "giraffe" which is a string! Strings can be put in double or single quotes (same rules apply for the echo function explained in the introduction when using the quotes and backslashes for escaping.) Remember the semi colon! We can change a variable multiple times in our script because it can indeed vary... $present = "playstation 2";//They ran out of PS2 so I had to but you a new present!$present = "Learn Algebra in 24 hours book"; 2. Outputting the value of a variable We output code by using the echo command again. $present = "Playstation 2";echo $present; Although, that on it's own is very useless since we define the variable and then echo the variable...we could just echo the present straight away. But suppose you have the present appearing many times in a paragraph... $present = "Pair of Underwear";echo "We got you a $present for your birthday since you have always been looking for a $present!"; That will give a result of - "We got you a Pair of Underwear for your birthday since you have always been looking for a Pair of Underwear!" So yes we can infact put variables in the echo command along with other text thanks to PHP finding the special dollar sign character and treating the words afterwards as a variable. So take a look at the following code and spot the error... $present = "Playstation 2";echo "You may like your $present, it cost us $100 to buy!"; Well PHP well come across the present variable and process it as usual. Then it comes to the next dollar sign and thinks that the text after that is a variable. Hence you will get an "Undefined Error" warning. (You will also likely get another error since you can't put a number straight after the dollar sign in a variable.) To fix this we use the magic backslash, which hopefully you are starting to see the wonder of. $present = "Playstation 2";echo "You may like your $present, it cost us \$100 to buy!"; 3. Changing part of a string. In order to best explain this part, we will play a mini game. Yay! Due to the powers of PHP, we can change part of a string such as the first character or the 15th character to a different value. So for example; $present = "Playstation 1";$present{12} = "2";echo $present; Effectively, we have bought the latest Playstation as opposed to the older one. Points to note are that PHP treats every character in the string as a value including the spaces and that the first character is actually character "0". So we can do this also $present = "Playstation 2";$present{0} = "F";$present{1} = "i";$present{2} = "r";$present{3} = "e";echo $present; So now we get "Firestation 2". But we can also use this to find the first letter of a string... $present = "Giraffe";$first_letter = $present{0};echo "I'll give you a clue, your present begins with a $first_letter!"; There is also an important element in there and that is we can make one variable have the same value as another variable. $ryans_present = "Football";$garys_present = $ryans_present"; In this case they both get the same present...a football! So I did say we would do a game so here it is, using everything you've learnt. Tell me what value well be outputed. Then run the script and see if you were right! $start = "game";$word1 = $start;$start{0} = "s";//$start{3} = "L";$start{2} = "i";$word0 = $start{2};$start{2} = "m";$word0{1} = $start{0};$end = $start;$word1 = "n";$word1{2} = "t";$start{0} = "g";$word2 = "cool";$word1{1} = "o";echo "This $start $word0 $word1 $word2"; There are many other functions that include strings but before we move on to those we need to learn about integers, booleans and functions to fully understand how we can manipulate text strings.
  22. Someone will have to explain how the whole IRC works because I have chatzilla but I've never spoken to anyone because I just dont have a clue how to work it... I wish I did. I've temporarily deleted my IM's to stop the urge of talking when I'm supposed to do coursework so I can't talk to anyone on those for a while...IRC is my only hope since technically it isn't an IM so i wouldn't be breaking the target I set myself. Loopholes are amazing.
  23. I'm a Christian - A presbyterian to be exact.
  24. Woops, almost forgot, if you want to see the thing in action, click here example.
  25. Sorry about the long wait for a while. I was stomped on this one last night and my connection went off so I couldn't get to do any more testing, but I remembered how to do what you want. For the sake of completion, here is the XML file I used; <?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="links.xsl"?><students>[tab][/tab]<student name="Chris"> <link>chris.com/ name="Kage"> <link>http://kage.astahost.com</link>[tab][/tab]</student></students> So to do what you want, just assign the tag <a> and then use the <xsl:attribute name=" "></xsl: attribute>Text for link here</a> So the complete code I used is; <?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform/ ; <xsl:template match="/"><html><body><xsl:for-each select="students/student"> <a><xsl:attribute name="href"> <xsl:value-of select="link"/></xsl:attribute> <xsl:value-of select="@name"/> </a> <br /></xsl:for-each></body></html></xsl:template></xsl:stylesheet> Hope this helped. It certainly relit a spark in my head about XML. If you've any qu's in the future on XML, just give me a buzz.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.