FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Suggestions » Include Comments In Coding
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Include Comments In Coding [message #34769] Fri, 17 November 2006 08:26 Go to next message
Dustin Kowalski is currently offline  Dustin Kowalski   United Kingdom
Messages: 62
Registered: August 2006
Location: Leicester
Karma: 0
Member
Ilia;

Just a quick idea for you.

I've noticed that an awful lot of the questions that you have to answer are along the lines of "Which template do I have to edit to change X?".

Wouldn't it make sense for you to include comments in the code to explain which template that bit of code was taken from?

That way, people like me that want to make changes could go to the relevant page on our forums, look at the source code, find the relevant part of the code, and see a comment saying which template that part of the code was from. That would save you from having to say "You need to make changes to abc.tmpl"
Re: Include Comments In Coding [message #34780 is a reply to message #34769] Fri, 17 November 2006 15:19 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Most templates are already documented, if you use the theme editor in the admin panel you'll see green text next to nearly all template identifying what it is that they do.

FUDforum Core Developer
Re: Include Comments In Coding [message #34788 is a reply to message #34769] Fri, 17 November 2006 15:37 Go to previous messageGo to next message
Dustin Kowalski is currently offline  Dustin Kowalski   United Kingdom
Messages: 62
Registered: August 2006
Location: Leicester
Karma: 0
Member
Absolutely. But to do this, the person wanting to make the change would have to work through any number of templates to get to the right one. Whilst it's to be understood that people really should look for themselves, I'm sure you;ll find a number (like me) who get exasperated after twenty unsuccessful minutes and then ask.

However, I wouldn't need to ask if the following were in place.

For example, I wanted to change the layout of the topic screens where "Delete", "Edit" etc buttons appear. (Still do actually.)

I've looked at the source code to see the HTML and have identified what needs changing. The thing is, I don't know what tmpl that's in! I've had a twenty-minute look and can't find it anywhere that I'd consider obvious, so I'm left with three options:

1: Keep on looking no matter how long it takes

2: Give up and decide not to make changes

3: Come here and request help.

I think that most people would choose option 3 fairly quickly, which means more work for you to to do, which wouldn't be necessary if the source code featured comments indicating every time a new template jumped in.

Still, you're the man who answers all the questions, so you decide http://www.jeb.org.uk/forumoj/images/smiley_icons/WinkSmile.png
Re: Include Comments In Coding [message #34818 is a reply to message #34788] Sun, 19 November 2006 16:37 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I think people just need to learn to use code search tools, a simple "grep" through template directory or directory code search is any half-decent gui editor will find you want you need.

FUDforum Core Developer
Re: Include Comments In Coding [message #35000 is a reply to message #34769] Fri, 01 December 2006 11:29 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
I strongly disagree Ilia. Most people who work on themes and skins are designers and not programmers, they use other tools than the classical "nerd tools" that a Linux user knows about. FUDforum is not all that easy to reskin, because it's hard to find out the structure of the skin, and what goes where etc. A documentation, WOULD help the designers create skins more easily.

I actually started working on a documentation a while ago, since I felt it was needed. But it's far from being ready.


However, I do have a request or suggestion to make.

When you create your own skin, and the forum is upgraded, it's always a bitch to find out which files have been altered etc etc. In many cases, if you want to skin your Forum, you only have to change in a very selected amount of tmpl files.

How would it be, that if you create a custom template, it makes "if file exist" calls on all the tmpl files in that directory, and if they do not exist, it uses the default template files in those spots instead? (Maybe it already does this, if so, ignore me, myself and I)

So, if all I wanna skin is the looks of an individual message, then I only put the drawmsg.tmpl in my CUSTOM folder, and since i want all of the rest to have the default appearance, I just let it compile those "missing" files from the default directory, instead of copying them over.

Now, to get back on track: I am writing not so much a Howto, but more a structure over what template file applies where in a table like demonstration thingy. If I ever get done I will of course present it here for other more talented people to continue on. =)


Re: Include Comments In Coding [message #35001 is a reply to message #35000] Fri, 01 December 2006 13:16 Go to previous messageGo to next message
Dustin Kowalski is currently offline  Dustin Kowalski   United Kingdom
Messages: 62
Registered: August 2006
Location: Leicester
Karma: 0
Member
Ernesto wrote on Fri, 01 December 2006 11:29

I strongly disagree Ilia. Most people who work on themes and skins are designers and not programmers, they use other tools than the classical "nerd tools" that a Linux user knows about.


I would think that you're correct. My knowledge of programming is very sparse. I've started to learn JavaScript and Java to further my own understanding, but my own background is in linguistics and economics.

Quote:

FUDforum is not all that easy to reskin, because it's hard to find out the structure of the skin, and what goes where etc. A documentation, WOULD help the designers create skins more easily.


Agreed. This is why I'm forever asking which templates to change. Judging by the content of the forums and the frequency with which such question are asked, I'd say that a lot of people would benefit from the help. I know I certainly would.

Quote:

I actually started working on a documentation a while ago, since I felt it was needed. But it's far from being ready.


These things always take a long time, don't they?! They really have to be a labour of love http://www.jeb.org.uk/forumoj/images/smiley_icons/WinkSmile.png

Quote:

When you create your own skin, and the forum is upgraded, it's always a bitch to find out which files have been altered etc etc.


I was very, very fearful of this myself. I've kept a list of the template files that I've changed, but am bound to run into problems eventually.

Quote:

How would it be, that if you create a custom template, it makes "if file exist" calls on all the tmpl files in that directory, and if they do not exist, it uses the default template files in those spots instead? (Maybe it already does this, if so, ignore me, myself and I)

So, if all I wanna skin is the looks of an individual message, then I only put the drawmsg.tmpl in my CUSTOM folder, and since i want all of the rest to have the default appearance, I just let it compile those "missing" files from the default directory, instead of copying them over.



This is a brilliant suggestion. It'd be great if it could be included, saving a lot of unnecessary work.

Thanks for that post, Ernesto. You said a lot of things that I felt, but didn't really feel comfortable posting about because of my ignorance of the computing world.

Thanks again http://www.jeb.org.uk/forumoj/images/smiley_icons/Happy.gif
Re: Include Comments In Coding [message #35014 is a reply to message #35000] Fri, 01 December 2006 15:38 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Ernesto wrote on Fri, 01 December 2006 06:29


When you create your own skin, and the forum is upgraded, it's always a bitch to find out which files have been altered etc etc. In many cases, if you want to skin your Forum, you only have to change in a very selected amount of tmpl files.

How would it be, that if you create a custom template, it makes "if file exist" calls on all the tmpl files in that directory, and if they do not exist, it uses the default template files in those spots instead? (Maybe it already does this, if so, ignore me, myself and I)



This is already possible, if you have missing templates in the custom theme, they will be referenced from the default theme.


FUDforum Core Developer
Re: Include Comments In Coding [message #35018 is a reply to message #34769] Fri, 01 December 2006 16:35 Go to previous message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
Alright Captain, awesome, will clean up my custom theme folder a bit then =)

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Save and undelete deleted messages
Next Topic: No more scrolling up when applying style to a message
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 10:50:56 GMT 2024

Total time taken to generate the page: 0.02480 seconds