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

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MOD: UnArchive (Restoration) Topics
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

msperry
Starting Member

USA
48 Posts

Posted - 14 February 2003 :  15:15:28  Show Profile  Visit msperry's Homepage
UnArchive (Restoration) Topic MOD
...................................................
For Snitz Version 3.4.03
...................................................

Author: Michael Sperry

email: msperry1@comcast.net
site: http://www.novasheep.com

Download: http://www.novasheep.com/snitz/UnArchiveMOD.zip

Ease of Installation (1-Hard, 10-Easy): 8


Feb 14, 2003

This MOD was designed for the ACCESS users since SQL Server users can use Stored Procedures.

This MOD will restore ALL archived Topics and related Replies to their original forum.
The MOD will also check that both the Archived and Original tables have the same fields.
If they are different, the MOD will create the missing fields before the restoration process can
be completed. This is done in case another MOD added fields one table but not the other.

The MOD doesn't require new files but changes will be made to the following files:
ADMIN_FORUMS.ASP
DEFAULT.ASP
INC_ICONFILES.ASP

I have included these files already modified from a new install of 3.4.03.

Also, I have include an icon for the DEFAULT page.
ICON_FOLDER_UNARCHIVE.GIF



INSTALLATION:
Upload modified files and the ICON file to your forum.

-------------------------------------------------------------------------------


That's it. I hope you like it.

Michael

- Michael
NovaSheep.Com

Edited by - msperry on 14 February 2003 15:25:04

Anacrusis
Junior Member

USA
219 Posts

Posted - 14 February 2003 :  16:24:42  Show Profile  Visit Anacrusis's Homepage  Send Anacrusis an AOL message
I can't download.. I get "Cannot find server or DNS Error"

The Internet ClubHouse
www.internet-clubhouse.com
Go to Top of Page

msperry
Starting Member

USA
48 Posts

Posted - 14 February 2003 :  16:36:27  Show Profile  Visit msperry's Homepage
I just tried it from the post and it worked for me.
I'll try it from another computer later tonight.

- Michael
NovaSheep.Com
Go to Top of Page

TestMagic
Senior Member

USA
1568 Posts

Posted - 14 February 2003 :  18:08:51  Show Profile  Visit TestMagic's Homepage
Wow, what a great idea. Thanks! I'm going to try this in a few days, when I get some more time.

Snitz rocks! · Search 2
Go to Top of Page

TestMagic
Senior Member

USA
1568 Posts

Posted - 14 February 2003 :  18:16:02  Show Profile  Visit TestMagic's Homepage
I just downloaded it no problem.

Snitz rocks! · Search 2
Go to Top of Page

PeeWee.Inc
Senior Member

United Kingdom
1893 Posts

Posted - 14 February 2003 :  19:37:18  Show Profile  Visit PeeWee.Inc's Homepage
Have you thought about postin the Moderator(s) in a dropdown as a mod?

De Priofundus Calmo Ad Te Damine
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 14 February 2003 :  20:05:04  Show Profile  Visit richfed's Homepage
Question: On my admin_forums.asp, the second large block of code called for in this mod is ... well, it appears to be there already. In fact, I have a bit of the poll mod's code smack dab in the middle of it. So, I'm thinking I can just skip that portion. You agree?

Why/how is it there???

Rich
[size=1]A Complete Idiot's Guide to MOD Implementation || On the Trail of the Last of the Mohicans[/size=1]
Go to Top of Page

Anacrusis
Junior Member

USA
219 Posts

Posted - 14 February 2003 :  20:42:36  Show Profile  Visit Anacrusis's Homepage  Send Anacrusis an AOL message
Ok, must've been my computer at work, i can download it now from home.

The Internet ClubHouse
www.internet-clubhouse.com
Go to Top of Page

msperry
Starting Member

USA
48 Posts

Posted - 17 February 2003 :  09:08:31  Show Profile  Visit msperry's Homepage
PeeWee, the drop down was some code that I found here in a post somewhere. I've had that in, so I would check the Archived post as I don't remember the topic it came from.

richfed, I'm not sure I understand you exactly the code in my MOD is not in the admin_forums.asp
The first part is an added case statement for UNARCHIVE that I'm placing just above the DELETEARCHIVE case.

The second big section of code is adding the functions that the case statements needs. Those functions are also not part of the original. If you don't have the POLL MOD installed you can remove the small section that I left in (I do have the poll mod installed on my forum) but it doesn't matter. If the poll mod isn't installed, the section of code labeled POLL MOD will just be ignored since the fields don't exist. No harm to leave it in as it will only set some values in the archive that most likely weren't set when the poll was installed.

All of the code is required of the MOD won't work properly.

I hope that answered your questions, sorry to the delay in response but my connection has been down.

- Michael
NovaSheep.Com
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 17 February 2003 :  10:09:34  Show Profile  Send ruirib a Yahoo! Message
I see a problem with this approach (of course, this doesn't mean I'm blaming your for it, Michael ): imagine that you have links to the original topics from other posts. When the topics were archived, these links remain valid, since topic.asp always "tries" to find a topic in the archive when it is missing from the live topics. Now, this restoration strategy creates new IDs for the restored topics, thus making any existing links to topics restored in this way to point to "nowhere".

In SQL Server this can be solved by using SET IDENTITY_INSERT. Access has a way to do this, though I'm not sure at this time whether it is achieved by this or using the statements to specify the staring value and increment for AutoNumber fields. I guess I'll try to have a look at this sometime...


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

msperry
Starting Member

USA
48 Posts

Posted - 18 February 2003 :  08:43:14  Show Profile  Visit msperry's Homepage
You are correct new ID's are created for both the topics and the replies and any links would in fact be invalid.

If someone knows a way to retain that original ID, let me know and I'll fix the code. The only other thing that I could do is search the text of the messages and change any links to topics that have been restored.


- Michael
NovaSheep.Com
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 18 February 2003 :  09:14:41  Show Profile  Send ruirib a Yahoo! Message
I intend to have a look at how ID preservation can be achieved. I'm very busy at the time, so I can't really say when I'll do it, but if you feel I'm taking too much time, be sure to bump this once in a while .


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 18 February 2003 :  15:40:48  Show Profile  Visit MarcelG's Homepage
Excellent initiative !!! This is an excellent idea!!
I haven't tried it yet, but does this restore all archived topics, or just some you selected (through a timeframe or something ?
A per-topic-restore would be also very handy, to just restore one topic at a time.

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 18 February 2003 :  18:29:09  Show Profile  Visit richfed's Homepage
quote:
Originally posted by msperry

richfed, I'm not sure I understand you exactly the code in my MOD is not in the admin_forums.asp
The first part is an added case statement for UNARCHIVE that I'm placing just above the DELETEARCHIVE case.

The second big section of code is adding the functions that the case statements needs. Those functions are also not part of the original. If you don't have the POLL MOD installed you can remove the small section that I left in (I do have the poll mod installed on my forum) but it doesn't matter. If the poll mod isn't installed, the section of code labeled POLL MOD will just be ignored since the fields don't exist. No harm to leave it in as it will only set some values in the archive that most likely weren't set when the poll was installed.

All of the code is required of the MOD won't work properly.





Well ... it's like this ... apparently, I was looking at YOUR version of admin_forums.asp rather than my own. I think it was the poll mod code that threw me ... I didn't expect it to be there ... I was in a hurry ... and, well ... I blew it! Egads! Sorry 'bout that.



I love this idea for a mod, by the way ... going to hold off implementing it, though, till the link issue is resolved. Thanks for working on it!



Rich
[size=1]A Complete Idiot's Guide to MOD Implementation || On the Trail of the Last of the Mohicans[/size=1]
Go to Top of Page

tduffy
Junior Member

146 Posts

Posted - 19 February 2003 :  12:26:41  Show Profile
is there a way to un archive just certain topics, instead of all of them?
Go to Top of Page

msperry
Starting Member

USA
48 Posts

Posted - 19 February 2003 :  16:32:48  Show Profile  Visit msperry's Homepage
This MOD does them ALL per forum. I did think about the per topic version and it should be easy to change the code to do it or at least add it but it will have the same result with the links.
That is that it will give the topic and replies new ID's so any OLD link to the topic would point to nothing.

I'll see how hard a change will be needed on a per topic basis.

If anyone know how to retain the original ID's for Access, please let me know and I'll gladly incorporate it. Even if the link issue, it gave me the results I was looking for since I accidentally archived a category that I didn't want done.

- Michael
NovaSheep.Com
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.19 seconds. Powered By: Snitz Forums 2000 Version 3.4.07