Merge Topic Mod BETA 2 - Postet den (8407 Views)
Development Team Member
Davio
Innlegg: 12217
12217
Mod Name: Merge Topic Mod
Version: Beta 2
Snitz Forums Tested with: 3.4.05 and newer (should be able to work with all 3.4 versions)
Database support: All database types supported
Author: Davio
Last Updated: September 25, 2006.
Description:
This mod allows you to merge 2 topics together, along with all of their replies. Replies will be ordered by their post date.
Download:
Primary site: http://www.snitzbitz.com/mods/details.asp?Version=All&mid=233

To-Do:
- Add feature to email author that his topic was merged with another. - Handling of subscriptions need to be dealt with for both topics being merged. - Maybe get a better icon to use? - Fix bugs!
Known Bugs:
- When merging 2 topics between 2 different forums, the merged topic ends up in the wrong forum. FIXED in beta 2
You guys have been asking me for this code for the longest while. So here it is. It is not fully ready for prime time. There is still some things left on the To-Do list and some bugs to iron out. But hoping with your help, we can get it there more quickly, instead of waiting on me. smile
Please don't use this on your live forum as yet. If you do, don't come and blame anyone here that your topics got messed up.
Please post your bug reports, errors, suggestions in this thread.<
   
 Sidestørrelse 
Postet den
Starting Member
sachin
Innlegg: 14
14
Thnx a lot Davio... will test it soon :)<
Postet den
Development Team Member
Davio
Innlegg: 12217
12217
Ok, I see the logic of my coding in the post_info.asp file needs a little more working on.
I'm using the older topic, the topic that has the older date, as the target topic. But when you merging between 2 forums, there is no way to find out which topic the mod/admin wants to merge with, using this logic. Because he could be merging an older topic with a newer topic.
So it will need a little recoding there.
Identify the topic mod/admin wants to merge with, then after, sort out which topic is older and let it remain as the main topic. The replies can come afterwards.
Did you all get that? tongue This thing is busting my brains. lol<
Postet den
Junior Member
rasure
Innlegg: 289
289
Hi Davio, I get this error when merging 2 topic in the same forum

if lcase(strEmail) = "1" then
'Send mail to author letting him know his topic was merged with another. 'DoAutoMoveEmail(allRec(Topic_ID, intOlderTopic))
strSql = "SELECT M.MEMBER_ID, M.M_NAME, M.M_EMAIL, T.FORUM_ID, T.T_SUBJECT "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M, " & strActivePrefix & "TOPICS T "
strSql = strSql & " WHERE M.MEMBER_ID = T.T_AUTHOR "
strSql = strSql & " AND T.TOPIC_ID = " & TopicNum
'Response.Write strSql
'Response.End
line 1833 set rs2 = my_Conn.Execute (strSql)

email = rs2("M_EMAIL")
user_name = rs2("M_NAME")
Topic_Title = rs2("T_SUBJECT")
ForumId = rs2("FORUM_ID")
Usernum = rs2("MEMBER_ID")

rs2.close

not sure if that's related to your above post, btw I also have your split topic mod installed on an already moded snitz, and I used the complete url to the topic to merge to, not sure if that's the correct way of doing it.<
Postet den
Development Team Member
Davio
Innlegg: 12217
12217
Yes, that part of the code is on the to-do list. Has to do with sending an email out to the author about what is happening with his topic. smile Can comment out that part of the code or change the 1 in this line " if lcase(strEmail) = "1" then" to 0. That will effectively turn off that section of the code.
Still busting my brains with the code when merging topics from different forums. Works if the topic is in the same forum though.<
Postet den
Development Team Member
Davio
Innlegg: 12217
12217
Ok, lets move on to BETA 2!
I think I fixed the bug with merging topics across forums. Only thing changed was the Merge Topic Mod code in post_info.asp. So copy the code from lines 957 - 1313 in post_info.asp to update to BETA 2.
Things you can test. 1. Merge topics in same forum. 2. Merge topics from different forums. 3. Merge topics and give it a new subject. 4. Do #1 and monitor the Topic and Replies count on default.asp
5. Do #2 and monitor the Topic and Replies count on default.asp
6. Merge topics with no replies. 7. Merge topics with replies. 8. Make sure the last post links point to the last posted reply or topic.
I have disabled the subscription section of the code, so you won't run into any errors while testing.<
Postet den
Dev. Team Member & Support Moderator
OneWayMule
Innlegg: 4969
4969
Postet den
Dev. Team Member & Support Moderator
OneWayMule
Innlegg: 4969
4969
1. Merge topics in same forum. Worked 2. Merge topics from different forums. Worked 3. Merge topics and give it a new subject. Worked 4. Do #1 and monitor the Topic and Replies count on default.asp Worked 5. Do #2 and monitor the Topic and Replies count on default.asp Worked 6. Merge topics with no replies. Worked 7. Merge topics with replies. Worked 8. Make sure the last post links point to the last posted reply or topic. Worked
As you can see, I had no problems so far... tested with and without locked forums, seems to work well.
Will give it some more testing with a live forum I'm running and get back to you with more info. smile<
Postet den
Development Team Member
Davio
Innlegg: 12217
12217
Excellent! Thanks OneWay! Whew! Glad I got the main part working. But it's not feature complete yet. Need to alert authors when moving their topics around. They will be totally lost without it.
Also need to take care when merging with moderated topics/replies. And to email subscribers that there are new replies to the topic they subscribed to.<
Postet den
Development Team Member
Davio
Innlegg: 12217
12217
OneWay, just out of curiosity, I checked the snitzbitz site a while ago and it showed the mod was downloaded 0 times since I uploaded it. How was it you downloaded the mod and the counter didn't increase?
I just downloaded it and it increased by 1. Strange.<
Postet den
Dev. Team Member & Support Moderator
OneWayMule
Innlegg: 4969
4969
Good question... I got merge_topic_mod-34-BETA_10.zip, if I download it now I get a different file name... might be the reason. wink<
Du må legge inn en melding