Author |
Topic |
Da_Stimulator
DEV Team Forum Moderator
USA
3373 Posts |
Posted - 09 November 2004 : 18:53:40
|
You could add me to that list davio, sounds like alot to look over < |
-Stim |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
|
muzishun
Senior Member
United States
1079 Posts |
Posted - 10 November 2004 : 02:33:30
|
I've never written any MODs, but I've gone through the code about a thousand times just to learn what things do, so if you need another proofreader, I'd be happy to help. I'll probably be best at finding nitpicky things like typos and stuff... I seem to find those quite often.< |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 10 November 2004 : 02:36:59
|
You have been added to the list of proof readers Bill. Will email you when the document is ready for proofing.
Don't need any more proof readers. Thanks for the interest from everyone. If anymore positions come up, will let you know in this topic.< |
Support Snitz Forums
|
|
|
Da_Stimulator
DEV Team Forum Moderator
USA
3373 Posts |
Posted - 23 December 2004 : 22:18:51
|
Something just popped into my head davio, I dont know whether or not this has been thought of, but why not "suggest" it to be a good idea that when creating a mod, you should create some kind of configuration variable, thats loaded with the rest, to flag whether or not the mod is installed and active.
This way, people developing other mods that might need to accomodate an existing mod can do so by checking this variable.< |
-Stim |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 26 December 2004 : 12:15:27
|
[Edited by Etymon - Reply should have been in another forum] < |
Edited by - Etymon on 26 December 2004 23:12:03 |
|
|
Da_Stimulator
DEV Team Forum Moderator
USA
3373 Posts |
Posted - 26 December 2004 : 14:23:09
|
Etymon, we can continue this discussion in the Mod Addon Forum w/o code< |
-Stim |
|
|
stefen
New Member
Italy
88 Posts |
|
Raavin
Starting Member
16 Posts |
Posted - 18 May 2005 : 20:23:04
|
Hey there,
I just posted a message yesterday asking if anyone wanted to start this kind of project. Better late that never I suppose. If there is anything I can do I will try. If I can get a taster of how you have approached the document then I can have a look into the Javascript bits. I'm not much at Javascript but if I understand correctly you mainly want a description of what the script does so people know where to look...is that right????
Also, does the document include things in FAQ form like "Adding a field to the post topic/reply..." or is is more of a tecnical description of the code.
Raavin ;)< |
Edited by - Raavin on 18 May 2005 20:29:40 |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 19 May 2005 : 12:46:30
|
The document is at a halt right now due to a lack of interest. Although all of the database fields, javacscript functions, vbscript functions and subroutines, have been documented. An added feature we wanted to add was to give a description of each global variable that was used. We didn't start on that though.
An overview of how each function works was basically what I was aiming for. What it did, how it works and what each variable was used for.
What is left was highlighting the security concerns when making a mod, how to create a mod, how to install a mod. Things like that. The info is there, just that we needed someone to put it into a user friendly format, that is easy to read and not just some boring document. A few persons volunteered to do that but didn't hear back from them on it.
quote: Also, does the document include things in FAQ form like "Adding a field to the post topic/reply..." or is is more of a tecnical description of the code.
I don't see how we could do that in the FAQ. That would be too technical as you would need to understand HTML and VBSCRIPT to accomplish that. Also considering line change may be different, code might be different. It wouldn't be helpful to a lot of people. Would end up with more questions that answers, if you ask me.< |
Support Snitz Forums
|
Edited by - Davio on 19 May 2005 12:48:48 |
|
|
Raavin
Starting Member
16 Posts |
Posted - 20 May 2005 : 01:24:03
|
quote: I don't see how we could do that in the FAQ. That would be too technical as you would need to understand HTML and VBSCRIPT to accomplish that.
Yeah I suppose, but don't you need to know these 'reasonably' well to use the information to create a mod?? The field thing was an example I've just been tackling. I'm not a guru by any means, more of a hacker, but just finding all of the places where I needed to add code to get things to write to the database then display them on the topic page was a pain in the backside. I've spent the last week most nights up until between 1 and 2 am getting it happening. I'm still pulling my hair out at bits of it. In the end it all seemed so obvious but you are talking about HTML, VBSCRIPT, ASP and SQL. If I'd had a guide about where to look, the actual programming would have been a piece of cake...well almost.
One idea for a format might be to create a heavily commented version based on the standard Snitz code, then a readable document that you can thumb through and refer to a starting point in the code that you can follow to complete tasks.
At the risk of becoming one of those who act interested at the start then bail out, any chance you could forward me the documentation to have a look at. I might be able to put together an example of what I am talking about.
Cheers,
Raavin ;)
< |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 20 May 2005 : 11:41:50
|
quote: Yeah I suppose, but don't you need to know these 'reasonably' well to use the information to create a mod??
Good point. But knowing the scripting languages reasonably well, isn't going to help much.
Here's an example. Many persons have wanted to make the same changes to thier poll mod and I have helped dozens of persons make the same change. But each time the instructions are different based on the mods they have already added. So I can't tell each person "see this topic on how to make the changes" because thier code is different.
This is what makes adding exact instructions in the document, on how to add a text box to the posting page. As was your example.
It would be easier to ask for some guidance here at the forums for help on doing something specific like that.
quote: In the end it all seemed so obvious but you are talking about HTML, VBSCRIPT, ASP and SQL.
It's HTML, VBScript and SQL queries. ASP isn't a scripting language.
quote: At the risk of becoming one of those who act interested at the start then bail out, any chance you could forward me the documentation to have a look at. I might be able to put together an example of what I am talking about.
An example? I would rather send it to you if you were going to help with the completion of the document. < |
Support Snitz Forums
|
|
|
Raavin
Starting Member
16 Posts |
Posted - 25 May 2005 : 00:08:39
|
quote: ...But each time the instructions are different based on the mods they have already added...
You are so right. I'm developing a mod at the moment on the vanilla snitz forum but the version I have installed for someone else is the Serverhacker version. I created the mod myself and I am finding it difficult to migrate it over. That said, You have to have something as a base to work from ie the vanilla flavoured version.
Before I started playing with Snitz I didn't really know much about coding HTML, never mind VBScript, Javascript, SQL etc. I have used Snitz as a practical platform to learn the ropes. If it was a bit more clearly documented it would have made things easier.
The FAQ I was thinking about was taking concepts that were used over and over and describing them in more detail, going into a bit of a discussion about uses then providing links to occurrences. Ideally these would go both ways.
eg.
Retrieving Data from the Database Single values into a variable
The ASP below outputs SQL which is used to retrieve a value from the REPLY_ID column(field) in the FORUM_REPLY table and places the value in as the Variable NewReplyID. Let's dissect the script.
strSql = "SELECT Max(REPLY_ID) as NewReplyID "
strSql = strSql & " FROM " & strActivePrefix & "REPLY "
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
strSql = strSql & " and R_AUTHOR = " & rs("MEMBER_ID")
set rs9 = my_Conn.Execute (strSql)
NewReplyID = rs9("NewReplyID")
rs9.close
set rs9 = nothing
The 'Max'(refer to SQL reference for more info) keyword retrieves the highest number in the REPLY_ID column (depending on the conditions), while the 'as' keyword stores this value temporarily as the alias NewReplyID
strSql = "SELECT Max(REPLY_ID) as NewReplyID "
Here we allocate which table we want to draw the data from. In Snitz, 'strActivePrefix' will insert the prefix for the name, in this case 'FORUM_', and the ampersand will concatenate the strings together giving 'FROM FORUM_REPLY'. To choose another table, replace reply with the table you are after or replace everything after the ampersand with an explicit string like "FROM FORUM_TOPIC"
strSql = strSql & " FROM " & strActivePrefix & "REPLY "
This is the conditions part. WHERE allows you to refine the search to rows which contain certain criteria. In this case we only want the data from the row WHERE the data in the FORUM_ID column equals the value stored in Forum_ID AND the data in the R_AUTHOR matches the data currntly in the MEMBER_ID column. Both Forum_ID and rs("MEMBER_ID") can be replaced with other variables or explicit values like numbers or strings.
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
strSql = strSql & " and R_AUTHOR = " & rs("MEMBER_ID")
There is a deeper explanation here (see constants reference) but suffice it t say that my_Conn.Execute (strSql) takes the SQL you generated above and...well executes it, opening a connection to the database called rs9.
set rs9 = my_Conn.Execute (strSql)
This bit stores the value of NewReplyID (remember the alias above) and puts the value into a 'proper' variable which can be used as normal.
NewReplyID = rs9("NewReplyID")
This bit cleans things up by closing the connection to the database then setting the value of rs9 back to zero
rs9.close
set rs9 = nothing
While the above is only my understanding of what's going on from experimentation, so is not entirely accurate, it's the sort of thing I'm talking about.
Thoughts-
In my own case of adding a field (it was a bit more complicated than that) there was a whole list of things to think about so I'd like to put together something which outlined a plan of attack like what files you need to look at, How Snitz locates certain data related to Categories, Forums, Topics and Replies and whether or not you will have to initialise variables on certain pages, the process flow for normal posting and expanding on this to acount for more advanced updating.
At the moment, I'm looking into seeing if I can get something that will export the code with coloured highlighting etc. to HTML. Then I'll see about adding links and popups. Some content to start with would be nice though.
Regards, Raavin< |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 25 May 2005 : 06:36:46
|
What you're talking about there, Raavin, looks more to me like an ASP/SQL tutorial which, from my understanding is not what this project is about. Also, the example you've provided is very specific, selecting the maximum value of a specific field in a specific table, if such tutorials were included in the documentation, they would have to be a lot more general than that to be of use to everybody.
< |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
Raavin
Starting Member
16 Posts |
Posted - 26 May 2005 : 20:10:33
|
Well...yes, it pretty much is an ASP/SQL tutorial and it is fairly specific but there are lots of similar examples throughout the Snitz code getting single and multiple values into variables. The thing I put together was just off of the top of my head as an example. The idea would be to introduce a concept, give a broken down example, provide links to similar examples and ideally provide a way to use it to identify pieces of code in the reverse manner also. A quick search of the code for "set rs = my_Conn.Execute (strSql)" pulls up more than 60 hits (more using variations on "rs" like "rs2"), which if you absorb the details of a simple example, I believe, make more sense and are reproducable.
Because ASP texts use different examples I think that the size of the snitz code gets intimidating and it is difficult to find your way around. In my example of adding a field, you need to add code to post.asp, post_info.asp, topic.asp and pop_delete.asp if you want to enter the data and have it show with a normal post and others if you want it on other pages. Then where in the page do you look ????
Maybe this isn't what this project is about so maybe it's another project which can benefit from the material already gathered. Maybe it's impossible. Who knows, I'm willing to give it a go.
Raavin< |
|
|
Topic |
|