Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 MOD install. Overview and install guide v.1.0
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

NorwegianViking
Junior Member

Denmark
119 Posts

Posted - 27 January 2004 :  21:42:45  Show Profile  Visit NorwegianViking's Homepage
Document: MOD installation. Overview and installation guidelines.
Version: 1.0a
Last update: 2004-02-01
Author: NorwegianViking (Řyvind Strřm)
<h2>Introduction</h2>
MOD’s are unknown stuff for those unfamiliar with computer code, and therefore a little scary. And as several requests for help with implementing MODs indicate, often not quite straight forward for beginners.

Therefore I have prepared this rather extensive document trying to give you, a beginner to MOD’s and computer code, a starting point.

Even if I have spent years of my life writing program code, the idea of MOD’s was unknown to me. I was very afraid of doing anything that could damage my forum in any way. Thinking that it was safer to keep to the standard. But after a while I saw that the functionality of my forum really could be enhanced and started to develop a more liberal view on MODs.

After installing a few MODs, and experienced the generousity and helpfullness of the people here at Snitz, my view on MODs have changed.
I have developed a set of guidelines, to assist myself in evaluating a MOD and in installing it. I hope this may be useful to anyone not-so-used-to computer code.
Possibly someone has posted something like this before, but anyway… (It’s just 18 A4 pages of text )

This document is mainly for people new to Snitz MODs and not familiar with ASP or other program code. Hopefully it will answer some of your questions around MODs, including questions you didn’t even knew you had. Hopefully it will encourage you to try to install a MOD or two.

<h2>Content of this document: </h2>
<ol type="1">
<li>MOD? What’s that? </li>
<li>What do I have to do to install a MOD?
- Is it difficult? </li>
- What does a MOD consist of? </li>
<li>Where can I find the MODs? </li>
<li>What should I look for when considering a MOD</li>
<li>How do I install the MOD?
- implementing strategy, indluding backup routines, directory structure and testing environment.
- tools
- step by step instructions</li>
<li>What do I do if I run into trouble? </li>
<li>Where can I get help if I can’t solve the problems myself?</li>
<li>Last resort - Is there someone that can install a MOD for me? </li>
</ol id="1">

<hr noshade size="1">

<h2>1. MOD? What’s that?</h2>
A Mod is an addition to Snitz, extending the functionality of the forum.
It could be a MOD that let you more easily maintain the FAQ. It could be a MOD that let you send email to inactive users. It could be a MOD that let you ban certain IP-adresses.
A MOD consist of program code and often additions to the Forum Database, and a detailed instruction on how to install the MOD.

Someone has taken the (often big) effort to write this code, and to share it with us for free. They (and other kind souls) also gives support when you and I run into problems when implementing the MOD.

<hr noshade size="1">

<h2>2. What do I have to do to install a MOD?</h2>

Installing a MOD is mainly a cut and paste job. There are some lines of program code that you will have to place at the right place in the existing Snitz files.
For a newbie (not familiar with program code) it CAN be a frustrating experience, but it is really something ANYONE can do.
Each MOD comes with detailed installation instructions assisting in finding the correct place in the code.

Let’s break the MOD down, to see where the difficulties are. A MOD consist of 1-3 parts:
<ol type="a">
<li><h3>New asp files to put in your forum folder. </h3>
Most MODs comes with some new files to place in your Forum directory.
This is an easy part. </li>

<li> <h3>Standard Snitz asp-files needs editing. </h3>
The simplest MODs involves adding one line of code to one Snitz file, while the more complex ones requires many changes to many Snitz files, making the latter more time consuming, but not necessary more difficult.

You will not do ANY coding yourself, your job is to insert the MOD’s code into the very right location in the Snitz files.
The MOD will include a installation description which gives you detailed instructions for finding the right location (by showing what code already there, and indicating approximate line numbers) in a program file, and then tells you what to delete, change or add.
The result of the installation depends on your ability to follow these instructions.
It is not difficult, and if you insert/change the code EXACTLY as you are told, most MOD's works right away.
You need to be sure to edit ALL the files that are to be edited.
You need to edit at ALL the places you are instructed to edit. </li>

<li> <h3>Changes/addition to the database tables. </h3>
Many, but not all MODs require changes/additions to the database. This may sounds scary, but the MOD writer normally provides <b>a script</b> to automate this part.
You upload this script to the Forum directory on the server and execute it from the Menu in Admin Options.
This is an easy part. </li>
</ol id="a">

The time involved depends on how good the documentation is and how many files you must edited. It can vary from a few minutes to several hours.

The installation process <font color="purple">will also require you to make a</font id="purple"> <s>also includes measures to copy</s> your existing forum files and your database, to make sure you can reset everything.

To summarize:
It can be a lot of job to install a MOD, and it requires painfully accuracy.

<hr noshade size="1">

<h2>3. Where can I find the MOD's?</h2>
There are several sources:
<ol type="a">
<li> <b>Here at Snitz: MOD Completed Add-Ons</b>
http://forum.snitz.com/forum/forum.asp?FORUM_ID=95]
- These are “finished” MOD's, that is: "all" errors are corrected.</li>
<li> <b>Here at Snitz: MOD Add-On Forum (W/Code)</b>
http://forum.snitz.com/forum/forum.asp?FORUM_ID=25
- These are finished MOD's, but might not be considered stable or just not moved to the "MOD Complete". Even if not “finished”, they are used succesfully by a lot of people.</li>
<li> <b>Snitzbitz</b>
http://www.snitzbitz.com/mods/default.asp
Here is a large collection of MOD's, presented in a much more structured way.</li>
<li><b>Other sources?</b></li>
</ol id="a">

When you find a MOD you want to use there is normally a link for downloading a .zip-file with all neccessary info and code. Sometimes you are redirected to the author’s site, and might have to register there to obtain the MOD.

<b>Don’t download the MOD before you are ready to install it!!!!! </b>
The reason for this is that MOD’s get updated “all the time”. You will want to have the latest version, or else you will risk having to do some code updating.
When you go looking for MODs, it is wise to maintain a word document with:
<ul>
<li>Name of MOD</li>
<li>Version of MOD</li>
<li>Version of Snitz</li>
<li>Link to download location !!!!!!! </li>
<li>Link to support forum</li>
<li>Comments</li>
<li>Status of the MOD (installed, to be installed, wait, no) </li>
</ul>
Later, when you are ready to install that particular MOD, you can easily locate it, and download the <b>latest</b> version.

Designate a special directory for all the Mods you download, and keep them in a subdirectory with a descriptive name for each MOD. (The name of the zip-file doesn’t always document the content.) In the subdirectory name, also include the version of the MOD.

<hr noshade size="1">

<h2>4. What should I look for when considering a MOD?</h2>
I have compiled some guidelines that I use when I go looking for MODs. The intention is of course to avoid starting installing a MOD which might give me trouble later.
If you really want a MOD, only no. 3 is a real show-stopper. You may ignore your findings in any other area, and just try to install.

<ol type="1">
<li><b>What does it do? Is it useful? </b>
Find out what it does, and if it will bew useful for your forum. Hopefully the name (and the description) you will give you a clue of what the MOD do, so you can decide if it will be useful to you. Unfortunately (or luckily) the MOD developers are better in describing how to make a MOD work, than telling what it does. You can always post a question about this. Surely someone else use it. </li>
<li><b>Is there reported problems? </b>
The purpose of checking this is to try to find out how finished/stable this MOD is.
Check if there is a lot of RECENT problems reported regarding installation of the MOD. Always do a search on Snitz, providing the name of the MOD. Probably you will get a loooooooong list of topics about the MOD, and about people’s problems with installing it. You should skim through, but start at the rear of the tread.
The number of topics involving installation problems MAY indicate how good/bad the MOD is, and how good support there is. But remember to consider the date of these post. Most MOD-makers instantly fix bugs that are reported, and include the fix in the downloadable code. But skimming through these topics might give you an idea of the level of support you can expect if YOU run into trouble. But again, check the date. A Mod-maker may have disappeared, permanent or temporarely. If no one else seems to assist with support, it might be better to stay away from the MOD, if you are unexperienced. </li>
<li><b>What version of Snitz is the MOD for? </b>
Next thing to look for, is what version of the Snitz-code the particular MOD is available for. This is normally stated in the description of the MOD. If you have a v4.x forum, a mod for v3.3 is no good. Then you will have to ask/wait for someone to adapt it to the never Snitz-version. (Unless you are familiar with ASP coding and capable of doing the adaption yourself)</li>
<li><b>How difficult it is to install this MOD? </b>
The description of the MOD should indicate the level of difficulty for implementing. Start with an easy one.</li>
<li><b>Is there a script for changes to the database? </b>
Most of the MODs involves changes to the database. But normally the author of the MOD provides a script for delaing with this. In that case this is an easy step. Otherwise you will have to add fields/tables to the database manually, and it this sounds scary, it is my recommandation to stay off this MOD. It should be stated in the description if there is a script for changes to the database. The script is an .ASP file and always starts with DBS_ . Sometimes you will have to download and unpack the MOD to see if a dbs file exist. Or you can ask at the forum.</li>
<li><b>Is the MOD dependent on other MOD’s? </b>
In that case you will have to install that MOD first. This is sometimes refered to as a ADD-ON. An example would be the Active Users MOD (which shows who is logged in/Guests and what they do), which have an Add-on that identify Spiders/Crawlers among these Guests. Of course you will have to make the same considerations as here also for this other MOD</li>
<li><b>Conflict with other MOD’s? </b>
From scrolling through the support-issues, does it seems like this MODs conflict with other MOD’s? In theory, no MOD should make it impossible to use another MOD, but sometimes it adds more complexity. In that case you need to check the support issues more carefully to see if it is solved, and maybe consider if you really need both.</li>
<li><b>Does the download link contain all the updates to the MOD? </b>
Or is some updates hidden in the help topics on Snitz? Some developers are good at updating the download file right away when they have fixed a bug, but sometimes it seems like only code is provided, so you will have to add things yourself. Ask at the forum if you are in doubt.</li>
</ol id="1">

If you think this is to much to check, just go ahead with the MOD. If you follow my guidelines later in this document, you don’t risk anything in trying.
The only ABSOLUTE NO-GO of the above, is number 3.

Please remember that all MOD’s are done by kind people that have used (a lot of) their spare time to write and support the MOD. But you do not receive a guaranty for support. Remenber to ask polite for help if you need it. Be greatful for the MOD and any help you get.

<hr noshade size="1">

<h2>5. How do I install the MOD?</h2>
First one word of advise: ALWAYS install ONE MOD AT A TIME. Make sure this one works before you start on the next one.

<h3>5.1 Strategy</h3>
Two things are really important.
<ul>
<li>You don’t want to loose ANYTHING if something goes wrong<li>
<li>You want to minimize the time your forum is off-line.<li>
</ul>

The MOST important thing is to make sure that IF anything goes wrong, you can get your forum up and running again, exactly as it was before you started on this particular MOD.

Normal practise for anything that involves change of code or database is to make sure you have an updated backup. The installation instructions of any MOD also recommends this.
I always do this, but I carefully decides WHEN I do it.

If you have an existing forum, you shold implement and test the MOD in a test forum and on a test database before going live.

I always prepare a totally new directory for the new MODded forum. I test from this, while the old forum is up and running. Often I invite user to the testforum to look for errors. Then I just rename the directories, so all links from my Site still works.

The installation strategy involves some questions/key points:

0a. Take the forum down.
0b. Don’t take the forum down.

1a. Backup database
1b. Copy of database for testing
1c. No backup of database.

2a. Backup forum-files
2b. Copy of forum-files for testing
2b. No backup of forum-files.

3a. DB-changes on a copy of the DB.
3b. DB-changes on the DB, when forum is down.
3b. DB-changes directly on a live forum.

4a. Gather the files for the complete MOD’ed forum in a new directory
4b. Gather only the changed/new files in a separate directory.

5a. Switch to the new directory.
5b. Add new/changed files to old directory.

<h3>5.2 Installation overview</h3>
<b>A safe strategy</b>
Here is a safe strategy, which will make it easy and quick to revert to previous installation, if anything goes wrong, and also minimize the time your forum is unavailable during installation.

<ul>
<li>2b. Copy of forum-files for testing</li>
<li>4a. Gather the files for the complete MOD’ed forum in a new directory
(and edit the ones that need editing) </li>
<li>1b. Copy of database for testing</li>
<li>3a. DB-changes on a copy of the DB. </li>
<li>Test normal Snitz functionality, using New directory</li>
<li>Test MOD functionality, using New directory</li>
<li>0a. Take the forum down. </li>
<li>1a. Backup database</li>
<li>3b. DB-changes on the DB, when forum is down. </li>
<li>Forum up</li>
<li>Test normal Snitz functionality, using New directory</li>
<li>Test MOD functionality, using New directory
(at this point users access the forum with old files, and will not see the new functionallity) </li>
<li>0a. Take the forum down. </li>
<li>5a. Switch to the new directory . </li>
<li>Forum up</li>
</ul>

On MODs that do not involve DB-changes, you could use this:
(but the above method is safer, as a MOD might mess up things in the DB)

<ul>
<li>2b. Copy of forum-files for testing</li>
<li>4a. Gather the files for the complete MOD’ed forum in a new directory
(and edit the ones that need editing) </li>
<li>Test normal Snitz functionality, using New directory</li>
<li>Test MOD functionality, using New directory
(at this point users access the forum with old files, and will not see the new functionallity) </li>
<li>0a. Take the forum down. </li>
<li>5a. Switch to the new directory . </li>
<li>Forum up</li></ul>


I also carefully keep track of the MODs on my PC.

<h3>5.3Detailed instructions</h3>

I will use Poll Mod as an example and go into more detail.
I assume that
<ul>
<li>your Forum is up and running and tested properly</li>
<li>you want to keep your existing forum up and running while you prepare the MOD</li>
<li>that this is the first MOD you install</li>
<li>The directories on the server is named “Database” and “Forum” </li>
<li>You have an FTP-program for transferring the files between your PC and the server. (I use WS-FTP)< </li>
<li>You have a text editor that can show line numbers (I use Araneae) </li>
<li>All referenced directories on the PC resides under D:\data\Snitz\Current, hereby called (path). You may of course use whatever name you like. </li>
</ul>
Detailed instructions, including a system on the PC to keep track of files for each MOD:
<h4>5.3.1 Preparation</h4>
<ul>
<li>With the FTP-program Copy the whole directory “Forum” from the server to the PC. (path)\0-Forum_v34_04\ ForumAfterInstall.
Now we have a fall back for the original Forum files. If necessary, we can just put these files back.</li>
<li>Create a new directory: (path)\1-PollMod. The 1- indicates that it is the 1th MOD I install. (Next MOD will start with 2-, and so on)</li>
<li>In this directory I create some subdirectories, namely:
- Zip
- UnmodifiedSnitzFiles (can be omitted, but I like to have it.)
- ModifiedSnitzFiles
- ForumAfterInstall </li>

<li>In Zip, I put the zip file, and unpacks it to ..\zip\poll_mod-34-207 (which in this case is the default name of the directory in the PollMod zip-file) </li>

<li>In this new directory you will now find the instructions, probably called readme.txt or readme.html. Print it. It is easiest to use it online, but it may be wise to tick of the steps that is completed. Don’t do any of the instructions yet.</li>

<li>Identify which NEW files the MOD includes.
These should be clearly listed in the documentation, or placed in a subdirectory in the MOD-directory we unzipped. The documentation will probably tell you that you safely can place these files on the server. Don’t do that now, as we are preaparing a NEW directory. We don’t want ANY new files in our existing Forum directory on the server. For now, copy these files to (path)\1-PollMod. There will be some .asp files, and possibly one or more .js, .gif and .dbs file(s).

<li>Identify which standard Snitz-files that needs to be edited.
Use the documentatition and pick these files from (path)\0-Forum_v34_04\ForumAfterInstall. Put them in UnmodifiedSnitzfiles. Really check that you have found all of them.</li>
</ul>

This ends the preparations. We move on to the

<h4>5.3.2 Installation</h4>

<b>Changes to files </b>

<ul>
<li>In the documentation, find the first file to change</li>
<li>Open it with your text editor (one that can show line numbers</li>
<li>Carefully follow the instructions in the readme file (see next paragraph). The most common cause for problems with a MOD is that the instructions is not followed exactly. And excactly means EXACTLY. One errror, and the MOD or the Forum will not function correctly.</li>
<li>Save the finished file to ModifiedSnitzfiles. </li>
<li>Tick off the change on your printed copy of the documentation </li>
</ul>

<b>How is the instructions given? </b>

There are two ways (as I am avare of) that the developers assist you in making the necessary changes.
- Type 1: HTML page or TXT file with detailed instructions for each code insert.
- Type 2: Finished files with code implemented. (Not to be used as is, as they are just samples) </li>

<b>Type 1</b> instructions would look like this

<hr noshade size="1">
In file <b>inc_iconfiles.asp</b> locate the string around line 152:
<font color="red">Const strIconYahoo = "icon_yahoo.gif|16|15"</font id="red">

Insert the following code AFTER this line.
<font color="blue">'#################### Poll Mod #####################
Const strViewComments = "view_comments.gif|108|16"
Const strViewResults = "view_results.gif|95|16"
Const strVoteNow = "vote_now.gif|72|16"
Const strIconPoll = "icon_poll.gif|15|15"
'###################################################</font id="blue">
<hr noshade size="1">
Colors are added by me.
So you would search for the red line and insert the blue lines after this, with copy/paste.

Often the finished code is also shown in the documentation:

<hr noshade size="1">
Const strIconUnsubscribe = "icon_unsubscribe.gif|15|15"
Const strIconUrl = "icon_url.gif|16|16"
Const strIconYahoo = "icon_yahoo.gif|16|15"

'#################### Poll Mod #####################
Const strViewComments = "view_comments.gif|108|16"
Const strViewResults = "view_results.gif|95|16"
Const strVoteNow = "vote_now.gif|72|16"
Const strIconPoll = "icon_poll.gif|15|15"
'###################################################
function getCurrentIcon(fIconName,fAltText,fOtherTags)
if fIconName = "" then exit function
if fOtherTags <> "" then fOtherTags = " " & fOtherTags<i>
<hr noshade size="1">


<b>Type 2</b>
Instruction would be:
Search for <font color="red">“Poll Mod” </font id="red"> in the sample <b>inc_iconfiles.asp</b> (around line 152)

The sample file may look like this (part of code)
<hr noshade size="1">
<font color="red">
Const strIconUnsubscribe = "icon_unsubscribe.gif|15|15"
Const strIconUrl = "icon_url.gif|16|16"
Const strIconYahoo = "icon_yahoo.gif|16|15"
'#################### Poll Mod #####################
Const strViewComments = "view_comments.gif|108|16"
Const strViewResults = "view_results.gif|95|16"
Const strVoteNow = "vote_now.gif|72|16"
Const strIconPoll = "icon_poll.gif|15|15"
'###################################################

function getCurrentIcon(fIconName,fAltText,fOtherTags)
if fIconName = "" then exit function
if fOtherTags <> "" then fOtherTags = " " & fOtherTags
</font id="red">
<hr noshade size="1">

while the unmodified file may look like this
<hr noshade size="1">
<font color="blue">
Const strIconUnsubscribe = "icon_unsubscribe.gif|15|15"
Const strIconUrl = "icon_url.gif|16|16"
Const strIconYahoo = "icon_yahoo.gif|16|15"

function getCurrentIcon(fIconName,fAltText,fOtherTags)
if fIconName = "" then exit function
if fOtherTags <> "" then fOtherTags = " " & fOtherTags
</font id="blue">
<hr noshade size="1">

So with type 2 you use the sample to locate the code to insert, find the same place in the unmodified file, and then put the correct code in there.

An easier way with type 2, is to use a [i]file comparision tool</i>, which will tell you all the differences between the two files. I am not familiar with this.

Anyway, make sure you find the right place and do exactly what the documentation tells you.

Line numbers is listed like <b>around</b> 153. The reason for not providing exact line references is that they will vary depending on how many MODs you have installed.
In the example above we insert 6 lines of code, so every line after this is pushed 6 lines down and of course gets new line numbers.

Be aware that there might be several places in a file that must be edited.
You may be asked to insert lines before, after or in between the code you locate. Sometimes you will need to delete some code and sometimes you will need to add code inside a line.

The latter is more difficult than just inserting lines, so we need to have a look closer look on that.

Three kinds of code inserts poses potentional problems.

1. Inserting Fields/tables in SQL statements.
2. Editing the Response.Write statement
3. Adding %> and <% to a an #include

<b>1. Inserting Fields/tables in SQL statements.</b>

The Sample file Post.asp for the POLLmod includes

<hr noshade size="1">
if strRqMethod = "Edit" or _
strRqMethod = "EditTopic" or _
strRqMethod = "Reply" or _
strRqMethod = "ReplyQuote" or _
strRqMethod = "Topic" or _
strRqMethod = "TopicQuote" then
if strRqMethod <> "Topic" then
'## Forum_SQL - Find out if the Category, Forum or Topic is Locked or Un-Locked and if it Exists
'################################# Poll Mod ##################################
'Added F.F_POLLS and T.T_POLLSTATUS to following SELECT statement.
strSql = "SELECT C.CAT_ID, C.CAT_NAME, C.CAT_STATUS, C.CAT_SUBSCRIPTION, " &_
"F.FORUM_ID, <font color="red">F.F_POLLS, </font id="red">F.F_STATUS, F.F_TYPE, F.F_SUBJECT, F.F_SUBSCRIPTION, "&_
"<font color="red">T.T_POLLSTATUS, </font id="red">T.T_STATUS, T.T_SUBJECT " &_
" FROM " & strTablePrefix & "CATEGORY C, " &_
strTablePrefix & "FORUM F, " &_
strActivePrefix & "TOPICS T" &_
" WHERE C.CAT_ID = T.CAT_ID " &_
" AND F.FORUM_ID = T.FORUM_ID " &_
" AND T.TOPIC_ID = " & strRqTopicID & ""
'###############################################################################
else
<hr noshade size="1">
Changes highlighted in red by me.

You then switch to the Post.asp you are about to modify, search for <font color="red">if strRqMethod <> "Topic" then</font id="red"> in the file and find this:

<hr noshade size="1">
if strRqMethod = "Edit" or _
strRqMethod = "EditTopic" or _
strRqMethod = "Reply" or _
strRqMethod = "ReplyQuote" or _
strRqMethod = "Topic" or _
strRqMethod = "TopicQuote" then
if strRqMethod <> "Topic" then
'## Forum_SQL - Find out if the Category, Forum or Topic is Locked or Un-Locked and if it Exists
strSql = "SELECT C.CAT_ID, C.CAT_NAME, C.CAT_STATUS, C.CAT_SUBSCRIPTION, " &_
"F.FORUM_ID, F.F_STATUS, F.F_TYPE, F.F_SUBJECT, F.F_SUBSCRIPTION, "&_
"T.T_STATUS, T.T_SUBJECT " &_
" FROM " & strTablePrefix & "CATEGORY C, " &_
strTablePrefix & "FORUM F, " &_
strActivePrefix & "TOPICS T" &_
" WHERE C.CAT_ID = T.CAT_ID " &_
" AND F.FORUM_ID = T.FORUM_ID " &_
" AND T.TOPIC_ID = " & strRqTopicID & ""
else
<hr noshade size="1">
My strategy here is to copy the lines from the MOD sample file and to comment out the original lines using ‘ in front. (You have to check if some other MOD also have inserted something here.)

<hr noshade size="1">

<b>2. Editing the Response.Write statement</b>
Another common example is this:

(This could be standard Snitz code:)
<hr noshade size="1">
Response.Write “this is a “ & _
“text”
<hr noshade size="1">
(it would write “this is a text” on the screen)

Let’s assume that the MOD wants to change this to “this is a superb text”.
You could be asked to change this to
<hr noshade size="1">
Response.Write “this is a superb “ & _
“text”
<hr noshade size="1">
or:
<hr noshade size="1">
Response.Write “this is a “ &_
“superb “ & _
“text”
<hr noshade size="1">
or:
<hr noshade size="1">
Response.Write “this is a “
´********* Poll MOD **************
Response.Write “superb “
´********* Poll MOD **************
Response.Write “text”
<hr noshade size="1">

The latter is best, because it clearly document the addition. The drawback is that you have to edit standard Snitz code.

This is invalid:
<hr noshade size="1">
Response.Write “this is a “ &_
´********* Poll MOD **************
“superb “ & _
´********* Poll MOD **************
“text”
<hr noshade size="1">


To document this, I add some more comments.

<hr noshade size="1">
<font color="red">‘Replaced (Poll MOD): Response.Write “this is a “ &_</font id="red">
Response.Write “this is a “
´********* Poll MOD **************
Response.Write “superb “
´********* Poll MOD **************
<font color="red"> ‘Replaced (Poll MOD): “text” </font id="red">
Response.Write “text”
<hr noshade size="1">
The code in red is for documenting what original code lines that no longer is active.

From sample POST.ASP (code is shortend)
Here I have marked with red the two lines that indicate that you need to perform the above action
<hr noshade size="1">
Response.Write " <tr>" & vbNewLine
'################################## Poll Mod ###################################
'Remember to remove the &_ code from the end of the line above.
Response.Write " <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>" & vbNewLine
Response.Write "</b><br />" & vbNewLine
' Remember to start the 2nd line below with Response.Write.
'###############################################################################
Response.Write " <br />" & vbNewLine & _

<hr noshade size="1">

Huh!? Scary stuff, eh? But read my somewhat more simple example above if this is completely black to you. Remember, you don’t need to understand the code.

<hr noshade size="1">

<b>3. Adding %> and <% to a an #include</b>

After you are instructed to find some code it may say:

Paste this ABOVE that.
(this) NOTE: Add a %> in front of this, and a <% after it.
<!--#include file="inc_activeusers.asp"-->

The result should look like this:
<font color="red">%></font id="red">
<!--#include file="inc_activeusers.asp"-->
<font color="red"><%</font id="red">
(code found)

(Color added by me)
(code found) refers to the code you are asked to locate.

<hr noshade size="1">

Check, and doublecheck that you get it right.


I prefer to add a MOD comment in the code. Then I can clearly see what is MOD code and what is standard Snitz code. In the above example, the author of the Mod has provided this along with the code to insert, but this is not always the case.
I use:
‘ ***** (name) MOD (version) **** Start
here goes the code
‘ ***** (name) MOD (version) **** End

This is quite useful if another MOD wants you to insert code at the same place.
To illustrate this, consider this example:

If your next MOD instructs you to insert some code BETWEEN the lines:

<hr noshade size="1">
<font color="red">
Const strIconYahoo = "icon_yahoo.gif|16|15"
function getCurrentIcon(fIconName,fAltText,fOtherTags)
</font id="red">
<hr noshade size="1">

your code could look like this:

a)
<hr noshade size="1">
Const strIconYahoo = "icon_yahoo.gif|16|15"
Const strViewComments = "view_comments.gif|108|16"
Const strViewResults = "view_results.gif|95|16"
Const strVoteNow = "vote_now.gif|72|16"
Const strIconPoll = "icon_poll.gif|15|15"
function getCurrentIcon(fIconName,fAltText,fOtherTags)
<hr noshade size="1">
or b):
<hr noshade size="1">
Const strIconYahoo = "icon_yahoo.gif|16|15"
'#################### Poll Mod #####################
Const strViewComments = "view_comments.gif|108|16"
Const strViewResults = "view_results.gif|95|16"
Const strVoteNow = "vote_now.gif|72|16"
Const strIconPoll = "icon_poll.gif|15|15"
'###################################################
function getCurrentIcon(fIconName,fAltText,fOtherTags)
<hr noshade size="1">

See the point? It would be easier to figure out where to put it in the last example.

I also make a note in the beginning of the file, informing myself of which MOD’s that has been added.


Regardless of how you get the correct code into the file; when all changes is done, save the file to ModifiedSnitzFiles, and tick it off in your printed readme-file, so you know what you have done.

After a while you will have completed all changes, and have a saved version of all of these files in your ModifiedSnitzFIles directory.

To summarize so far;
<ol type="1">
<li>We have a copy of our current forum in directory 0-forum_v_34_04\ForumAfterInstall</li>
<li>We have new files for the MOD in 1-PollMod</li>
<li>We have the modified Snitzfiles in 1-PollMod/ModifiedSnitzFiles. </li>
</ol id="1">

Let’s continue:

<b>Does the MOD require changes to the DB?</b>
This will be stated in the documentation. Usually this is done with a .dbs file. If you are asked to manually change the db, I would stay off this MOD. It is possible, but it is not beginners stuff. We will test the DB-changes on a copy of the database.

<b>Time to set up a test forum.</b>
<font color="red">Please read Note #1 at end of document</font id="red">
Follow these steps carefully:
<ol type="1">
<li>Make a new folder on your server, call it ForumWithPoll (or anything you like) </li>
<li>Upload all the files in (path)\0-Forum_v34_04\ForumAfterInstall to this directory. This should be a copy of your existing forum, will function as a backup, and no files in this should be added, changed, moved or deleted </li>
<li>If db-changes is involved – place a copy of your DB in your database directory on the server. (Use FTP to your PC and back, or a file copying tool on the server) </li>
<li>If 3: Edit config.asp in ForumWithPoll to point to your test database. </li>
<li>Start default.asp in ForumWithPoll, and check that the forum works properly. (This will still be the old forum – at least a copy) If it doesn’t work, you have not got all the files from your current installation, or messed up the db string in config.asp. </li>
<li>Upload the files (not directories) from 1-PollMod to ForumWithPoll. These should not overwrite ANY files on the server. </li>
<li>Start the forum in ForumWithPoll. </li>
<li>If 3, go to Admin options, log on as a Admin and do “MOD setup” (as described in the readme file). This is where the DBS file comes into play. This database update is performed on the Test DB. (IMPORTANT: Make a note if any errors are reported here. Keep error messages for later reference if you need help.) </li>
<li>Exit the forum. </li>
<li>Upload files from 1-PollMod\ModifiedSnitzFiles to ForumWithPoll </li>
<li>If 3, and ModifiedSnitzfiles contains config.asp, you need to change it again, to point at your test-db. </li>
<li>Start the forum in ForumWithPoll</li>
<li>In the admin section, perform “Check Installation” This will update forum variables</li>

Now you have a Test forum in ForumWithPoll, where you can safely test for errors, and familiarize yourself with the functionallity of the MOD. You may even invite some of your forum members to help you test.

<li>Test the normal Snitz functionality. </li>
<li>Test the functionality of the MOD and that you don’t get errors </li>.

Until now, your users have been able to use the old forum uninterupted, and should problems arise, they will not even notice.
If you run into problems, now is the time to solve them. (See next section)

<b>Going live</b>
<li>If satisfied, take down both forums so no one can post. </li>
<li>Exit both forums</li>
<li>Backup your database. (No need to do this earlier, as you could risk missing some posts) </li>
<li>If 3: Edit config.asp in ForumWithPoll to point to your production database. </li>
<li>Start the forum in ForumWithPoll</li>
<li>If 3, go to Admin options, log on as a Admin and do “MOD setup” (as described in the readme file). This database update is now performed on the Production DB. (IMPORTANT: Make a note if any errors are reported here. Keep error messages for later reference if you need help.) </li>
<li>In the admin section, perform “Check Installation” This will update forum variables. (Not sure if it is necessary, but it doesn’t harm</li>
<li>Exit the forum</li>
<li>Rename the old forum to “Forum_old” or whatever you want </li>
<li>Rename the “ForumWithPoll” to “Forum” </li>
<li>In the admin section, perform “Check Installation” </li>
<li>Take the forum back up. </li>
<li>Test again. </li>

And finish the installation some days later, when everything looks fine:
<li>Delete Forum_old. (Your backup of the Forum files now resides in 0-Forum_v34_04\ForumAfterInstall) </li>
<li>Copy all the files in Forum to 1-PollMod\ForumAfterInstal. (This is your backup for the new forum, and also the starting point for your next MOD) </li>
</ol id="1">

Note; On my ISP, there is some kind of caching of asp-files, so it may take a while before the implemented changes appear.

That was a lot of steps, and you may want to do some short cuts when you get more familiar with MODding, but this method keeps your existing Forum untouched while you install and test, and also makes it easy to get back to the old forum.

<hr noshade size="1">

<h2>6. What do I do if I run into trouble? </h2>
<h3>Problems using the MOD</h3>
If you can’t figure out how to USE a MOD, try to read the documentation again, or search for/post a question at the appropriate place at Snitz. Sometimes the documentation is unclear. In PollMod, one of the steps needed to see the “Add Poll” link is difficult to understand.
<h3> Error messages </h3>
If you get error messages, try to figure out what file that produces the error. If this is not shown, you may have to turn off “Show Friendly HTTP Error Messages” in your browser. (Tools/Internet Options/Advanced/ Browsing).
If an error is reported in an .asp file, go back to the installation documentation and check that you actually have done everything correctly, regarding changes to this file.
Very often this is the case – it turns out that a small chunk of code is inserted wrong or not at all.
If everything looks fine, try searching Snitz for topics that includes the poll name and the asp file name. There is a chance that others have experienced the same as you.

<hr noshade size="1">

<h2>7. Where can I get help if I can’t solve it myself? </h2>
There is a lot of helpful and skilled people on Snitz that would be glad to help you. Even if it seems like they are online 24 hours a day; remember that no-one is paid to give support, so don’t expect a solution to arrive 5 minutes after posting.
The place to ask for help is normally here: Help: MOD Implementation
http://forum.snitz.com/forum/forum.asp?FORUM_ID=94
This is where you ask if you have problems getting the MOD to work.

If you suspect there is something wrong with the MOD itself, like getting an error when trying to use one of the functions in the MOD; the right place to ask for help is:
Add-On Forum (W/Code) http://forum.snitz.com/forum/forum.asp?FORUM_ID=25]

When you post:
<ul>
<li>DO use a meaningful title (not Help, or Problems) Tell at least what Mod you use in the error title. </li>
<li>DO try to be precise in describing the error. What action is causing the error, what happens and what error message do you get? </li>
<li>DO include version of MOD and of Snitz and what database you use. </li>
<li>DO change an .asp to .txt if someone asks you to post a link to a file. (as .asp cannot be downloaded) </li>
<li>DON’T place a link to your database in a post, as it may be downloaded. </li>
<li>DON’T post a link to a config.asp which points to your database (change the path/name before posting it) </li>
</ul>

<hr noshade size="1">

<h2>8. Is there someone that can install for me? </h2>
Yes, there is. You have two options.
1. You can ask for this kind of help and hope that someone will help you with a particular MOD. Some of the Guru’s offer this as a paid service. That could be an alternative if your forum has financial backing and you just don’t have the time for MODding.
2. Download an already MODded Snitz forum. Code where a lot of MODs already is installed, is available from a few places.
<ul>
[*]Image: http://www.forums2001.com/forum/home.asp</li>
[*]Crash: http://www.crashsite.nl/portal_content.asp </li>
[*]Serverhacker: http://www.shnforum.com</li>
</ul>
Support might be limited to the private forums of the authors of these MODs, as it might be more difficult to get support here.
These superMODded forumcodes might also not include the latest versions of the MOD, and it might be more complex to update a MOD your self. But they will most certainly save you a lot of job.

<hr noshade size="1">

Well, if you have read this far, it has been worth the many days it took to write this.
Good luck.

Document changes:
<b>2004-01-29.</b>
Note #1 added (feedback from Huwr)
Section 3 - near end: Text could be read as a MOD would automatically make a backup. Text changed. (feedback from MeTV)

<b>2004-02-01.</b>
Section 5:
Added some lines about <b>Adding %> and <% to a an #include</b>

<font color="red">
<h3>Notes:</h3>
Added 2004-01-29
<h4>1. Recommendation for test environment (Huwr)</h4>
When adding a mod you should test it somewhere other than your live website first, your web host will not be pleased if you make a mistake which ends up crashing the webserver. Webhosts do not generally provide space for you to test code.</font id="red">

kind regards
NorwegianViking

Mod installation for beginners | User registration problems?

Edited by - NorwegianViking on 01 February 2004 03:34:20

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 27 January 2004 :  22:15:34  Show Profile
Nice work NorwegianViking. I am sure this will help many new comers when to comes for them to know more about mods.

We are already working on a Mod Document with more detailed info (but not as much info as yours) on the functions (asp and javascript) and description of database tables and fields and description of variable names.

We might be able to take some of your excerpts and put into the doc. Would you mind?

Again, nice work. That's a lot of info. <

Support Snitz Forums
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 27 January 2004 :  22:17:34  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Awesome document, great work!!
I'm sure this is useful for a lot of people.

I've seen a few typos, but overall very well worked out.
You should offer it as .pdf or .doc file for download.

Again, great job!

EDIT: you're reading a lot faster than me, Davio! <

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz

Edited by - OneWayMule on 27 January 2004 22:18:47
Go to Top of Page

NorwegianViking
Junior Member

Denmark
119 Posts

Posted - 28 January 2004 :  12:52:49  Show Profile  Visit NorwegianViking's Homepage
Davio, OneWayMule;
thanks.

Davio, feel free to use it as you like.
One.. please mail my typos. English is not my native language, so I expect that there is a lot of things that could be better. But I hope it is readable for most people anyway.<

kind regards
NorwegianViking

Mod installation for beginners | User registration problems?
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 28 January 2004 :  18:19:26  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
quote:
One.. please mail my typos. English is not my native language, so I expect that there is a lot of things that could be better. But I hope it is readable for most people anyway.

I think it's written very well, and easy to understand for unexperienced users.
I will go though the guide tomorrow and send you an email with my suggestions/corrections.<

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 28 January 2004 :  18:41:19  Show Profile
Nice job NViking. Thanks for writing this. There's a lot of good info in there.

I've written a few mods, and for me the toughest part of the whole process is writing the read-me. I think you've pointed out some things that will help me write better ones.
<

    _-/Cripto9t\-_
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 29 January 2004 :  05:18:32  Show Profile
Excellent document, NorwegianViking, should be of great help to those starting out with Snitz and going all glassy eyed at the mention of Mods. One thing I did pick up on was the following line:
quote:
The installation process will also includes measures to copy your existing forum files and your database, to make sure you can reset everything.
I know you go on to clarify this later in the document but there are people who may read the above line and assume that the Mod somehow backs their files up automatically; I think it needs to be very clear that it's something they must do manually.

<

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.”
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20577 Posts

Posted - 29 January 2004 :  05:45:44  Show Profile  Visit HuwR's Homepage
One more thing I would add that is not mentioned,
When adding a mod you should test it somewhere other than your live website first, your web host will not be pleased if you make a mistake which ends up crashing the webserver. Webhosts do not generally provide space for you to test code.<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20577 Posts

Posted - 29 January 2004 :  08:38:07  Show Profile  Visit HuwR's Homepage
Excellent work by the way :)

(I have made the topic sticky)<
Go to Top of Page

NorwegianViking
Junior Member

Denmark
119 Posts

Posted - 29 January 2004 :  08:44:26  Show Profile  Visit NorwegianViking's Homepage
Thanks guys.
I have updated the text with your feedback.
Huwr, your wise advise is included as a Note, as it will take a little time to get it into the text properly.
I must admit that I do "live" testing. What is required of the PC to do testing locally? Will asp code run from the harddisk?<

kind regards
NorwegianViking

Mod installation for beginners | User registration problems?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20577 Posts

Posted - 29 January 2004 :  08:59:48  Show Profile  Visit HuwR's Homepage
you need IIS or PWS to test it at home.

It was only intended as a note really, some hosts especially cheap/free mass hosters will get particularly annoyed if something you do causes a problem, say you forget to add the line that exits a loop for instance, this will crash a server pretty quickly.<
Go to Top of Page

Edwin1
Junior Member

107 Posts

Posted - 30 January 2004 :  22:48:15  Show Profile  Visit Edwin1's Homepage
whoa! That is really long!<

--Edwin
Go to Top of Page

NorwegianViking
Junior Member

Denmark
119 Posts

Posted - 01 February 2004 :  03:35:04  Show Profile  Visit NorwegianViking's Homepage
Updated text.

Added some lines about Adding %> and <% to a an #include
<

kind regards
NorwegianViking

Mod installation for beginners | User registration problems?
Go to Top of Page

Panhandler
Average Member

USA
783 Posts

Posted - 01 February 2004 :  09:57:23  Show Profile  Visit Panhandler's Homepage
Thank you. I will print it out so that I can study it.
A document of that size and clarity usually takes
a lot of time to compose. It is very generous of you.
It inspires me to hope that I can contribute something
equally important some day.
Thank you again.

<


"5-in-1 Snitz Common Expansion Pack" - five popular mods packaged for easy install
". . .on a mote of dust, suspended in a sunbeam. . ."
HarborClassifieds
Support Snitz Forums


Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 01 February 2004 :  12:52:21  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
NorvegianVoking, a nice addition IMO would be instructions on how to use "Alternative MOD Setup" for people who can't use the standard MOD Setup.<

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

NorwegianViking
Junior Member

Denmark
119 Posts

Posted - 01 February 2004 :  15:40:27  Show Profile  Visit NorwegianViking's Homepage
Pan: . Yes, it did take some time. MS Word reports that I have worked on it 28 times, with a total editing time of 3844 minutes....
But, as you said, the inspiration to contribute comes from seeing others contributions. Thinking of the many hours a lot of people have used on MODs and support, it is nice to give something back. Even if it's only indirectly of use to these people.

OneWay: Yes, I just noticed that in another post. Will incude it in a day or so.
<

kind regards
NorwegianViking

Mod installation for beginners | User registration problems?
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07