Author |
Topic |
Anders M
Junior Member
Sweden
117 Posts |
Posted - 27 April 2001 : 20:29:41
|
Version 2 now available for download: http://www.paddla.space2u.com/subscription_mod_2.zip
Brief description: On the start page (default.asp) I have added an extra column that contains checkboxes. When you check a checkbox, you subscribe to the corresponding forum. To unsubscribe, simply uncheck the checkbox. When someone replies to a topic or posts a new topic, the subscribers of the forum get an email which contains the text and the URL to the topic.
News compared to version 1:
- Admin interface.
- Database updated when member/forum/category deleted.
- Fixed the notify on creation of topics.
-Anders M
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 28 April 2001 : 17:05:37
|
I'm running 3.1 SR4 and where you marked your code I don't have it in mine... Any reason why?
Test Site www.eastpasco.com HuwR's SR4 release. Colors and Graphic scheme done by Richard Kinser. |
|
|
swatijain
Starting Member
48 Posts |
Posted - 28 April 2001 : 23:22:59
|
Will this code cause any timeout's if you have around 1000 members subscribed to the forum? Does it use the aspemail queue method or something similar...?
Thanks!
Edited by - swatijain on 28 April 2001 23:23:08 |
|
|
Anders M
Junior Member
Sweden
117 Posts |
Posted - 30 April 2001 : 04:22:23
|
quote: I'm running 3.1 SR4 and where you marked your code I don't have it in mine... Any reason why?
What is it you don't have?
I used Snitz 3.1 sr4 and added code to it. The code I added is clearly marked.
I have also modified some code from Snitz 3.1 sr4. That code I modified is also clearly marked.
-Anders M
|
|
|
Anders M
Junior Member
Sweden
117 Posts |
Posted - 30 April 2001 : 04:47:53
|
quote: Will this code cause any timeout's if you have around 1000 members subscribed to the forum? Does it use the aspemail queue method or something similar...?
This code sends one email message at a time sequentially. If the mail server responds slowly, this code will have to wait to send the next message, but will continue to run. If the mail server is very slow or busy, I suppose there might be a timeout. However, I haven't setup any special timeout in my code. Maybe this should be included in the next version?
I haven't used any queueing methods. Do you know where I can learn about it?
Regards,
-Anders M
|
|
|
Anders M
Junior Member
Sweden
117 Posts |
Posted - 30 April 2001 : 10:33:16
|
This code uses the file inc_mail.asp from Snitz 3.1sr4 for sending email, and that file has no queueing.
My own forum uses Chili!Mail. I've read the documentation of Chili!Mail and it doesn't seem to have any queueing methods.
One way to improve the code would be to put lets say 100 email adresses to the 'bcc' of the mail. If there are 1000 subscribers, the code would have to call the mail server only 10 times. The figure 100 cannot be hard coded, since I suppose different mail packages have different limits for how many users you can email at once.
-Anders M
Edited by - Anders M on 30 April 2001 18:22:06 |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 30 April 2001 : 10:50:26
|
Can I send you my 2 files that need the code in it? I'm bald from scatching my head on this one.
Rick
Test Site www.eastpasco.com HuwR's SR4 release. Colors and Graphic scheme done by Richard Kinser. |
|
|
Anders M
Junior Member
Sweden
117 Posts |
Posted - 30 April 2001 : 12:13:28
|
quote: Can I send you my 2 files that need the code in it?
Rick: Of course, send me the files.
|
|
|
XavierSlater
Junior Member
United Kingdom
137 Posts |
Posted - 30 April 2001 : 15:50:53
|
Anders,
Any chance you have modified this to work with the Category re-ordering, and Hide Forums under Category Mods?
Its the Default.ASP one with problems. I have tried to edit the code, but I is getting lost.
Help appreciated.
Regards,
Stuart
|
|
|
Greg Bowman
Starting Member
USA
30 Posts |
Posted - 30 April 2001 : 18:38:33
|
Anders,
congrats on a great mod! I have been waiting the whole week for it (I skipped V1), and I just got this working. It took about an hour as I prefered to hand edited my pages (I have the "file attachments" Mod). Well documented comments and everything works as advertized!
I see this as a killer feature for driving traffic back to my site. I am hoping that one day you will want to complete a Topic subscribe mod. Is that what the Topic_ID field (in FORUM_SUBSCRIPTIONS) will be used for?
Hope the feedback will encourage others,
Greg
Edited by - Greg Bowman on 30 April 2001 18:42:13 |
|
|
Anders M
Junior Member
Sweden
117 Posts |
Posted - 01 May 2001 : 14:18:54
|
Rick,
I received your files. Some of your files are quite different from the files in the original Snitz 3.1sr4. The one that differs most seem to be default.asp. In your default.asp there is a call to a method sGetColspan. In exactly those places, my MOD also deals with colspan, since I have introduced an extra column.
I didn't see the definition of sGetColspan in the files you sent me. If you post the code for sGetColspan so I understand what it does, maybe I can help you.
-Anders M
|
|
|
Anders M
Junior Member
Sweden
117 Posts |
Posted - 01 May 2001 : 14:22:01
|
Stuart,
I haven't used my MOD in cooperation with any other MODs. Maybe you have the same problem as Rick? (see my previous posting)
If you send me default.asp, maybe I can help you (but I cannot promise anything).
-Anders M
Edited by - Anders M on 01 May 2001 14:23:09 |
|
|
Anders M
Junior Member
Sweden
117 Posts |
Posted - 01 May 2001 : 14:29:01
|
Greg,
Glad you like the MOD. I will make a version 3 that includes topic subscription. That's what the TOPIC_ID field will be used for, just as you suspected.
-Anders M
Edited by - Anders M on 01 May 2001 14:29:58 |
|
|
Greg Bowman
Starting Member
USA
30 Posts |
Posted - 01 May 2001 : 17:24:31
|
Can't wait.
Maybe you could help me with one last thing. I did not want to have the a popup window appear everytime a user subscribes. I am not yet proficient enough to work out how to change the line so it does not happen.
I presume I need to change this line in default.asp:
<input type=checkbox <%=SubscribeCheckbox(rsForum("FORUM_ID"))%> onClick="if(this.checked) openWindow('pop_subscribe.asp?MEMBER_ID=<%=memberId%>&TOPIC_ID=0&FORUM_ID=<%=rsForum("FORUM_ID")%>&CAT_ID=<%=rsForum("CAT_ID")%>&F_SUBJECT=<%=ChkString(rsForum("F_SUBJECT"),"urlpath")%>&subscr=1'); else openWindow('pop_subscribe.asp?MEMBER_ID=<%=memberId%>&TOPIC_ID=0&FORUM_ID=<%=rsForum("FORUM_ID")%>&CAT_ID=<%=rsForum("CAT_ID")%>&F_SUBJECT=<%=ChkString(rsForum("F_SUBJECT"),"urlpath")%>&subscr=0');">
And I would need to silence the pop_subscribe.asp (I can easily do that). Any help with removing the popup would be appreciated.
I was thinking (though this is beyond my skills), one last "nice to have" is a new column in the members.asp that lets you see what members have subscribed to. Useful data to have.
cheers Greg.
|
|
|
Anders M
Junior Member
Sweden
117 Posts |
Posted - 01 May 2001 : 18:17:45
|
Rick and Stuart,
I've modified your files and sent them to you. Some of your files differ quite a lot from the original Snitz 3.1 sr4, but I did my best. Does it work?
-Anders M
|
|
|
Anders M
Junior Member
Sweden
117 Posts |
Posted - 01 May 2001 : 18:37:35
|
quote: Maybe you could help me with one last thing. I did not want to have the a popup window appear everytime a user subscribes. I am not yet proficient enough to work out how to change the line so it does not happen.
I have introduced a popup, not for notifying the user, but for getting some ASP code running on the server when the checkbox is checked. The ASP code in the popup modifies the SUBSCRIPTION table in the database.
When the user clicks a checkbox, JavaScript code will run on the client (onClick="..."). The JavaScript opens the popup, wich will make the ASP code execute on the server.
Another way of doing it would be to load an ASP page in the current browser window, but I think that's a worse alternative. Greg, what do you think?
-Anders M
|
|
|
Topic |
|