|
Post by iDesign on Mar 15, 2009 7:29:16 GMT -5
How hard is it to make a custom mini profile? I've been learning javascript for a little while, and I really want to do something forum related. I just need an idea of how tricky it is, then I'll decide whether to have a go.
Thanks!
|
|
|
Post by Blind on Mar 15, 2009 7:38:53 GMT -5
All coding can be difficult. If this is going to be your first major code, i would suggest something a slight bit smaller, but if you really are intent on creating a mini profile i suggest studying mini profile codes before actually starting on your own. This will help you understand the elements in a mini profile and what you will need to make one.
|
|
|
Post by iDesign on Mar 15, 2009 8:00:37 GMT -5
Okay. I'm looking at the one you have here, and it looks complicated. For instance: for(a=0;a<TsMp.length;a++){ I have no idea what that does etc. I think I'd have to learn a lot more before making a decent code that works.
|
|
|
Post by Blind on Mar 15, 2009 8:37:53 GMT -5
The easiest way too learn is to base your code on someone elses, but at the same time test things out on a test board to see what happens.
|
|
|
Post by iDesign on Mar 15, 2009 8:59:40 GMT -5
*steals tS mini profile code* xP Not really. I'll grab one from PBS to have a go with.
|
|
|
Post by Blind on Mar 15, 2009 9:02:51 GMT -5
Yeah just study it, look through and see what each line does, then start writing your own using the techniques you learned from the code.
|
|
|
Post by iDesign on Mar 15, 2009 9:25:49 GMT -5
I made a start on my code ^_^
|
|
|
Post by yilduz on Mar 15, 2009 12:25:39 GMT -5
If this is going to be your first major code, i would suggest something a slight bit smaller As a coder, I don't completely agree with this. Everyone has always told me the same thing, but I rarely listen because I've found the best way for me to learn is to tackle a massive project. It helps me learn many aspects of the language in a lot of instances. I've just never really believed a person can learn a whole lot by writing a code only six lines long. Everyone learns differently, though. Okay. I'm looking at the one you have here, and it looks complicated. For instance: for(a=0;a<TsMp.length;a++){ I have no idea what that does etc. I think I'd have to learn a lot more before making a decent code that works. That's called a "for loop." There are different kinds of loops in coding. This loop has three parts separated by semicolons. The first part of this one is starting off with a variable named "a" and saying "a" is equal to 0. The second part says as long as "a" is less than the length of "TsMp," do whatever is in the loop. The third part says increase "a" by 1. The actual purpose of the loop is in the curly bracket things "{" and "}" which you cut off. Let's just say the part between the brackets is document.write('poop'); Now let's figure out what it does. for(a=0;a<TsMp.length;a++){ document.write('poop'); } It comes to the for part, a is 0. a is less than the length of TsMp, so let's add 1 to a and do what's in the loop. It writes "poop" onto the page. Now it's at the end of the loop, but since it's a loop, it goes back to the beginning. Now a is 1, though. It's still less than 5, so it adds 1 to a and does the loop. It writes "poop" to the page again. It'll keep doing that until a isn't less than 5 anymore. Once that happens, it skips past the loop and keeps going down the page to write the rest of the code. What the loop ended up doing was writing "pooppooppooppooppoop" to the page. I know I'm not the best person in the world at describing things, but do you have any questions?
|
|
|
Post by iDesign on Mar 15, 2009 12:30:36 GMT -5
I see, so TsMp is just a variable?
|
|
|
Post by yilduz on Mar 15, 2009 15:53:17 GMT -5
I see, so TsMp is just a variable? TsMp is a variable that was defined at some other point in the code before the loop.
|
|
|
Post by xcessive on Mar 15, 2009 17:50:26 GMT -5
I think its about time we made yilduz a coding mod....
|
|
|
Post by iDesign on Mar 15, 2009 18:01:14 GMT -5
That does seem like a fairly good idea yes
|
|
|
Post by Blind on Mar 15, 2009 19:36:52 GMT -5
If this is going to be your first major code, i would suggest something a slight bit smaller As a coder, I don't completely agree with this. Everyone has always told me the same thing, but I rarely listen because I've found the best way for me to learn is to tackle a massive project. It helps me learn many aspects of the language in a lot of instances. I've just never really believed a person can learn a whole lot by writing a code only six lines long. Everyone learns differently, though. By smaller code i meant something that is not as complex. I do agree with you there but i find that something like a board modification is a bit easier and at least starting with that you can understand the functions used in proboards coding along with how to grab certain proboard elements. Yes TsMp is a variable that i created at the beginning of the code, off course it stands for "Transcendent Studios Mini profile". Your variable names can be whatever you like really. It is the main variable of the entire code, which is the same major variable for the majority of the proboards codes. "document.getElementsByTagName("TD");" That certain variable grabs an array of elements that have the tag name "TD", which is a table cell.
|
|
|
Post by iDesign on Mar 15, 2009 19:41:19 GMT -5
Okay. I won't do a mini profile yet then. So, board mod. document.getElementsByTagName("TD"); Surely that gets every item with the tag "TD" in the whole document?
|
|
|
Post by iDesign on Mar 15, 2009 20:03:56 GMT -5
On another note, I actually completely understand how to make a board mod ^_^ I will ask here if I need help if that's alright.
|
|