Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

Quacker Jack

Quacker Jack Avatar

*****
ProNation

1,666


December 2007
So, as you know, I'm one of the n00best coders, as I can recognize some functions of codes (assuming it isn't complex), but yet I can barely handle even writing the simplest of simple codes in any language (okay, HTML I can handle, and CSS a bit as well). So with that being said, I'm absolutely stuck. xD

URL: bit.ly/qR7TVs
CONCEPT: mirrorimg.net/rns.png (note, some text colors are poop brown, that's not right)

That would be the new website, Remusion. Please don't ask for details right now, maybe one day. Or you can figure it out. All I think you can tell is it is being put on SMF forum software. Which to my knowledge is CSS + PHP. Which means I must use FTP to access the coding.

I haven't messed with anything other than CSS. I've gotten the background white, and a logo on there. That's...... about all I know how to do. I don't know how to get rid of stuff, or change stuff to match. *sigh* I don't know PHP at all, and CSS I can easily edit, but not produce too much. However, I'd like to learn.

Anyhow, any suggestions on where I should go with trying to figure out my coding?

JD

JD Avatar



1,032


June 2008
w3schools is a great place to start 8-)

Zaxinou

Zaxinou Avatar
Asar Ptah Neb Ankh

**
Official Member

30


July 2008
JD Avatar
w3schools is a great place to start 8-)

Oh snap :-/

Join Today!

Quacker Jack

Quacker Jack Avatar

*****
ProNation

1,666


December 2007
W3schools is a great resource. It really is. It is just I've never really learned how to code..... but how to understand it. I mean, I understand the segments of it all, but I have a hard time understanding how to tie it together.

Specifically JD - where do you especially recommend me focusing the time into? (I'm assuming a bunch is in the PHP, as I'm quite.... bad in that)

Zaxinou

Zaxinou Avatar
Asar Ptah Neb Ankh

**
Official Member

30


July 2008
There are some coding tutorials on SI but I don't think they really cover PHP perhaps there is something on net.tutsplus.com/ might be worth looking at ^_^

Join Today!

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Believe it or not, www.pixel2life.com/ has a decent set of PHP tutorials. If there's anything specific you want, you can request it here and I'll try to write a tutorial on it. (I need an excuse to write more tutorials.)

As for SMF... what you write will be a combination of HTML, CSS, JavaScript, PHP, and probably MySQL. There might be other languages, there might not. The trick to learning to program is first coming up with an idea on what you want to do. This sounds easy, but it really isn't. After that, we need to think up a step-by-step process of how we'll implement the code.

Let's take a "Remove Last Post Column on Main Page" code for PB. Let's break down the steps of what we need to do, line by line:
1) First, we need to make sure we're on the main page (location check)
2) We know that we are trying to remove a specific cell, so let's iterate over all cells (the for loop)
3) For each cell we're iterating over, let's see if it's a last post cell (the if-statement)
4) We have our cell, so now let's hide it (style.display = "none")

So, we now just broke down the process of writing a remove LP column code. However, we now need to debug. If you test in every browser, you're inevitably going to find a bug here: There's a small (1-2px) gap where the column was! Now debugging this will be more difficult if you've never done that before, but here's what caused it: the column span (colSpan) of the category title row is still 5, and not 4! So we need to fix that.... so, steps 5 and 6 time.

5) For each cell we're iterating over, let's see if it's category title row (a second if-statement)
6) We have our cell, so now let's change the colSpan. (colSpan = 4)

So, that should complete the code. This is just a random example. Developing for SMF is slightly different since it presents a different structure. It might be more worthwhile to know what you want to do so that we can help walk you through it.

Quacker Jack

Quacker Jack Avatar

*****
ProNation

1,666


December 2007
Alright Chris, good idea on how to go about it. So what I need to do is:

1. Remove the "Hello Member", "Show Posts", "Show Replies", "Date", etc.
2. Remove Search Bar.
3. Remove News section.
4. Remove all vertical borderlines.
5. Add header/footer.
6. Change last post message.
7. Change post/topic display of message.
8. Make "pages" when viewing boards removed from top and moved to bottom.
9. Put Nav tree on the same bar as the text buttons are.
10. Change all buttons into text buttons.
11. topic listing mod.

That's a good chunk of what I need to do. I know there is WAY more but that gets me started. Tonight I'll poke around some of the coding, and see what I can do. I know that a chunk of the stuff I want to do is basic, so that will work great.

Quacker Jack

Quacker Jack Avatar

*****
ProNation

1,666


December 2007
Alright, I believe I found where I can customize a board modification to my liking, however I am doing it wrong I guess. Here is the snippet of the code.

FILE: core/BoardIndex.template.php
/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<strong>', $txt['last_post'], '</strong>  ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'];
echo '
</td>
</tr>';


What I did:
/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<strong>', $board['last_post']['link], '</strong> ', '<br />
', $board['last_post']['time'], '<br />
', $txt['by'], ' ', '<strong> ' $board['last_post']['member']['link'], '</strong> ';
echo '
</td>
</tr>';


Planning it out, I though I wanted:
<strong>[lastpost]</strong><br />
[lastpost][time]<br />
[by]<strong>[lastpost][member]
<strong>

In order to play:
Jack's a Retard!
Today at 6:56 A.M.
by Jack

What am I doing wrong here?


Simie

Simie Avatar

******
ProScripter

1,052


May 2006
I heard w3schools was meant to be really crap, and people were trying to topple its no.1 spot on google with a much better (more standards compliant) guide.

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Jack: Is it just not displaying properly or is it throwing a PHP error? I can't test right now, but I didn't see a PHP syntax error. :P

newBookmarkLockedFalling