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)
 Sticky Topic Mod v1.0
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 5

Old Ager
New Member

Italy
59 Posts

Posted - 28 December 2001 :  13:23:57  Show Profile  Visit Old Ager's Homepage  Send Old Ager an ICQ Message
THANKS TO HUWR FOR THE ORIGINAL ADDINPLACE MOD

This MOD allows you to make a topic "stick" to the top of your forum without having to lock and unlock it. It also gives you the option of making ONE of your sticky topics ALWAYS stick to the very top if you choose. Any other topics you make sticky will show below this one unless you change it.


I am asking you all to thoroughly test this and let me know how it can be improved. If it does work well, at least tell me how I can clean the code up if it needs it. I have only tested this on Snitz v3.3.03 (or whatever the latest is) w/ Access DB.

Now mind you, what I did was put about four topics in a forum on my home PC (WinXP Pro) and bounced the oldest topic back and forth about 30 times. I did it while the topic was unlocked and while it was locked and any other combinations i could think of. But, since it was 6am and I was dazzled by the excitement of releasing my first ever Snitz MOD, I could have been seeing things.

So, please give this a test run if you're interested and post your findings here.

Oh yeah, I have included HUWR's original install file for those who are using his MOD and want to try this one. Sorry, but they aren't compatible. You'll have to remove the old one first, hence the old install file.

Thanks in advance (I hope),

Old Ager

DOWNLOAD: http://www.old-ager.com/files/StickyTopic_1_0.zip

DEMO: http://www.ls3k.com/snitz Thanks Nathan!

UPDATE HISTORY:

1/13/02 - Added the ability for Admin's and moderators to make a topic sticky from post.asp. Also made it so when a topic is sticky, the red up-arrow will appear to the left of the topic subject. It would have been too much work to make different icons to go in the left-hand column, so I took the easy way out. Updated ZIP (NOTE: the last update noted in the ZIP is from January 7th. It just took me a while to get around to uploading it. Sorry!)

1/1/02 - Updated the Readme.txt file to reflect the changes Nathan suggested for post_info.asp. Please DO NOT add the Message Icon MOD code if you have not installed it in your forums. I included it in the readme file just so those who do have the MOD installed know to put my code below it. I also changed the topic ordering code in forum.asp so that it will not order by "sticky status" if the topic is archived. Updated ZIP

12/31/01 - Updated the Readme.txt file to reflect changes in the first and last code modifications required in forum.asp. The first one fixes a DB error you get when trying to view archived topics. The second one makes it so the "sticky" icons don't show up when viewing archived topics. Updated ZIP

12/30/01 - Updated the DBS file to also add the fields to the A_TOPICS Archive Table. Included a DBS fix file for those who have already installed the mod. Updated ZIP

12/29/01 - Added the ability to make ONE sticky topic always remain at the very top of the forum regardless of other sticky topics. Updated ZIP


Edited by - Old Ager on 13 January 2002 16:34:07

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 28 December 2001 :  14:03:23  Show Profile  Visit HuwR's Homepage
Actually, my lockInplace mod does allow you to post to the topic which is locked at the top, you just need to unlock it once it is locked in place, it still stays at the top.

Go to Top of Page

Old Ager
New Member

Italy
59 Posts

Posted - 28 December 2001 :  14:05:19  Show Profile  Visit Old Ager's Homepage  Send Old Ager an ICQ Message
Hmmm, HuwR, when I was using it, ithe topic would always fall back into place after I unlocked it. Maybe I installed it wrong. Well, don't I feel dumb....

OK everyone, first change: this MOD doesn't fix anything! It just gives you a separate Sticky option where you don't have to lock a topic in order to make it sticky. Sorry HuwR!!

Old Ager


Edited by - Old Ager on 28 December 2001 14:24:57
Go to Top of Page

Old Ager
New Member

Italy
59 Posts

Posted - 29 December 2001 :  19:19:35  Show Profile  Visit Old Ager's Homepage  Send Old Ager an ICQ Message
Added another function and updated the zip. See original post for link and ful info.

Old Ager
Go to Top of Page

mafe
Starting Member

44 Posts

Posted - 30 December 2001 :  01:02:36  Show Profile
excelent... :)

Go to Top of Page

Cyber Paladin
New Member

55 Posts

Posted - 30 December 2001 :  01:18:54  Show Profile  Visit Cyber Paladin's Homepage
Works like a charm.

I did end up editing a few things though just because I tend to do that. I changed to one graphic as the button for the pop-up (different alt sentences). I also took out the (STICKY) part beside the topic name when stuck, it just looked out of place, and I couldn't get it to look right no matter what I did to it. So, I ended up changing the folder icons for all sticky topics. Instead of the pink folder (for new post) or yellow one (no new posts) I created another icon just for the stickies that replaces those folder icons. The stickes are easily visible now. :) Other than that works fine. [:b]

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

- "Profanity is the one language all programmers understand."
- "Always remember: Amatuers may have built the Ark, but professionals built the Titanic."
- "f y cn rd ths y cn gt a gd jb n cmptr prgrmmng."

Edited by - Cyber Paladin on 30 December 2001 01:20:47
Go to Top of Page

Old Ager
New Member

Italy
59 Posts

Posted - 30 December 2001 :  05:50:45  Show Profile  Visit Old Ager's Homepage  Send Old Ager an ICQ Message
Nice Cyber Paladin. Making a third folder icon for sticky topics never even crossed my mind. Glad it works for ya and i don't mind that you edited it. i dp the same with many of the mods i use.

Old Ager
Go to Top of Page

suhern
Junior Member

186 Posts

Posted - 30 December 2001 :  08:44:49  Show Profile
This looks like a wonderful mod but I need to ask whether this will affect the archive function since you added 2 new fields into forum_topic table (if I am not wrong). The fields are not corresponding added into forum_a_topic table.

Go to Top of Page

Old Ager
New Member

Italy
59 Posts

Posted - 30 December 2001 :  14:22:44  Show Profile  Visit Old Ager's Homepage  Send Old Ager an ICQ Message
suhern,

good question! i never thought about it. my assumption is that it shouldn't since HuwR didn't add columns to the archive tables in his mod either. of course, back then the archive function may have been a mod...

Anyone out there who can help answer this?

Old Ager
Go to Top of Page

Old Ager
New Member

Italy
59 Posts

Posted - 30 December 2001 :  14:42:58  Show Profile  Visit Old Ager's Homepage  Send Old Ager an ICQ Message
OK,

After reading some related threads I have made a few changes. Please see update info in original post.

Suhern,

I tested this by making a topicky sticky AND locked to the top and then archived it and I received no error. That was before I added the fields to tha archive table, though.

If anyone else can test this i'd appreciate it.

Old Ager
Go to Top of Page

suhern
Junior Member

186 Posts

Posted - 30 December 2001 :  20:47:36  Show Profile
quote:

OK,

After reading some related threads I have made a few changes. Please see update info in original post.

Suhern,

I tested this by making a topicky sticky AND locked to the top and then archived it and I received no error. That was before I added the fields to tha archive table, though.

If anyone else can test this i'd appreciate it.

Old Ager



I think the archive error will suface not during archiving but when trying to read an achived topic. It probably will work if forum_a_topic has the equivalent fields. Well that was my experience with some of the mods.. thanks for the great mod though!



Edited by - suhern on 30 December 2001 20:48:38
Go to Top of Page

Old Ager
New Member

Italy
59 Posts

Posted - 30 December 2001 :  23:59:21  Show Profile  Visit Old Ager's Homepage  Send Old Ager an ICQ Message
suhern,

you were right. i got an error when trying to read archived topics. problem solved though with the latest update. just a couple of minor changes in two of the forum.asp code mods. details above.

glad you like the MOD BTW!!

Old Ager
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 31 December 2001 :  14:31:48  Show Profile  Visit Nathan's Homepage
When I installed the mod, it doesn't set the default values for T_STICKY to 0. It sets them, instead, to null which makes all new topics appear at the bottom.

I looked at the dbs file and it looks right, I'm gonna fiddle with it.

 Nathan Bales - Romans 15:13
---------------------------------

Snitz Exchange | Mod Resource
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 31 December 2001 :  14:47:41  Show Profile  Visit Nathan's Homepage
Heres how I fixed it.

Post_info.asp about line 630

quote:
		'## Forum_SQL - Add new post to Topics Table
strSql = "INSERT INTO " & strTablePrefix & "TOPICS (FORUM_ID"
strSql = strSql & ", CAT_ID"
strSql = strSql & ", T_SUBJECT"
strSql = strSql & ", T_MESSAGE"
strSql = strSql & ", T_AUTHOR"
strSql = strSql & ", T_LAST_POST"
strSql = strSql & ", T_LAST_POST_AUTHOR"
strSql = strSql & ", T_DATE"
strSql = strSql & ", T_STATUS"
if strIPLogging <> "0" then
strSql = strSql & ", T_IP"
end if
strSql = strSql & ", T_ARCHIVE_FLAG"
strSql = strSql & ", T_STICKY"'<-- ### START STICKEY MOD
strSql = strSql & ", T_TOPSTICKY"'<-- ### END STICKEY MOD

'## strSql = strSql & ", C_STRMOVENOTIFY"
strSql = strSql & ") VALUES ("
strSql = strSql & Forum_ID
strSql = strSql & ", " & Cat_ID
strSql = strSql & ", '" & txtSubject & "'"
strSql = strSql & ", '" & txtMessage & "'"
strSql = strSql & ", " & rs("MEMBER_ID")
strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", " & rs("MEMBER_ID")
strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
if Request.Form("lock") = 1 then
strSql = strSql & ", 0 "
else
if Moderation = "Yes" then
strSql = strSql & ", 2 "
else
strSql = strSql & ", 1 "
end if
end if
if strIPLogging <> "0" then
strSql = strSql & ", '" & Request.ServerVariables("REMOTE_ADDR") & "'"
end if
strSql = strSql & ", 1 "
strSql = strSql & ", 0 "'<-- ### START STICKEY MOD
strSql = strSql & ", 0 "'<-- ### END STICKEY MOD

'## strSql = strSql & ", 1 "
strSql = strSql & ")"



 Nathan Bales - Romans 15:13
---------------------------------

Snitz Exchange | Mod Resource


Edited by - Nathan on 31 December 2001 14:48:58
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 31 December 2001 :  14:51:01  Show Profile  Visit Nathan's Homepage
You could take this mod a bit farther if you wanted, and add a check-box at the bottom of the post field next to the "Include signature" check that is "Make this topic stickey"

(For admins and mods only of coarse)

 Nathan Bales - Romans 15:13
---------------------------------

Snitz Exchange | Mod Resource
Go to Top of Page

Old Ager
New Member

Italy
59 Posts

Posted - 31 December 2001 :  23:17:34  Show Profile  Visit Old Ager's Homepage  Send Old Ager an ICQ Message
Thanks for the help Nathan!! I have updated the readme file with your code and the ZIP has been updated.

I am currently making icons that will indicate a topic is sticky so you don't have to add the "sticky" text in the topic subject line. should have those done soo with the updated code.

after that, i will definitely look at adding a checkbox for the admin/moderator to make a topic sticky when they create them.

Thanks again for your help!!

Old Ager
Go to Top of Page
Page: of 5 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.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07