Author |
Topic |
Dan Martin
Average Member
USA
528 Posts |
Posted - 14 July 2002 : 14:34:07
|
News Forum MOD 1.0
Update: This version is not compatible with Snitz v3.4. It is compatible with 3.3.x (and perhaps prior versions). An updated 3.4 version of this MOD can be found here.
Download: http://www.councilofgrey.com/downloads/News_Forum_MOD.zip
MOD Purpose: This MOD allows you to target one forum as your News forum and present the latest news anywhere you want. It displays topics only, with a link to the entire thread. Ideal for use on your homepage. This MOD supports moderated topics. If you'd like to allow everyone to post news, make your News Forum moderated. The news posted by normal members will not show up until it is accepted by a moderator.
This MOD also removes signatures from the post before displaying it.
Example: This MOD is used on the homepage of http://www.councilofgrey.com Made by: Dan Martin Made on: I've had the base code in use for about a year, but I turned it into a complete MOD on July 14, 2002. Files to change: 2 (config.asp, admin_home.asp) Number of changes: 3 (could be more depending on your implementation) Files needed: admin_news_forum.asp, inc_news.asp, dbs_News_Forum.asp
Complete instructions are included in the News_Forum_readme.txt in the zip. |
Edited by - Dan Martin on 23 September 2002 14:06:43 |
|
Pouyan
New Member
91 Posts |
Posted - 14 July 2002 : 14:43:51
|
Does this work with hidden forums ?
Is there anyway to set a limit (number of characters to display) with a "Read More" link to the actual article ? |
|
|
Dan Martin
Average Member
USA
528 Posts |
Posted - 14 July 2002 : 14:48:38
|
Yes, it would work with hidden forums. Although the links to the threads would be pointless for anyone without access, as they'd end up at the forum.
No, this MOD doesn't cutoff the news at a specific point. And it doesn't show number of replies. I may release my Slashdot MOD some time in the future that does what you are talking about.
|
|
|
Pouyan
New Member
91 Posts |
Posted - 14 July 2002 : 14:53:55
|
your Slashdot MOD sounds good I can't wait.
Content Display MOD does what I am talking about, but it is so old and out of date that I almost found it impossible to install. look here: http://forum.snitz.com/forum/topic.asp?TOPIC_ID=30853 |
|
|
Dan Martin
Average Member
USA
528 Posts |
Posted - 14 July 2002 : 15:01:58
|
I wouldn't count your chickens. I wrote my original Slashdot MOD at work, and I'll have to rewrite it again from scratch. I've got multiple MODs in the hopper waiting to be finished. It might be a long while.
|
|
|
stylishvn
Junior Member
Vietnam
185 Posts |
Posted - 15 July 2002 : 06:19:55
|
quote: News Forum MOD 1.0
Download: http://www.councilofgrey.com/downloads/News_Forum_MOD.zip
I have a problem with the link above plz check out it again
p.s : also need ur help, Dan Martin. Could U tell me and help me creat a side in the left hand like ur 4rum ?? plz tell me something I must to do in inc_top.asp and all file related and I'll try, Thanks
Edited by - stylishvn on 15 July 2002 06:27:41 |
|
|
Dan Martin
Average Member
USA
528 Posts |
Posted - 15 July 2002 : 12:10:13
|
Just checked, and the link works fine. I have no idea why you'd have a problem.
There are several threads that tell how to create a left side navigation. If you cannot find what you are looking for, please open a new thread in "Help: Current Version" about that, and I will try to help you there.
|
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 15 July 2002 : 14:57:35
|
Hey Dan,
I'm looking forward to trying out your new MOD! I saw the reply about the Display Content MOD above. Is your MOD anything like it? ... similar features and the like.
Thank you for thinking of us!
Cheers,
Etymon
Edited by - Etymon on 15 July 2002 14:58:21 |
|
|
Dan Martin
Average Member
USA
528 Posts |
Posted - 15 July 2002 : 16:31:31
|
I've never tried the "Display Content MOD" so I'm not familiar with it. This MOD simply provides an include file (inc_news.asp) that you can include anywhere you chose (although a demo page implementing the include is provided) that does exactly what you see at the demo site listed above. The forum and number of topics are configurable through an Admin Panel.
My reason for releasing this as a MOD is because I get at least a request per month from Snitz users for the code to the www.councilofgrey.com homepage. This MOD is that code. Now, I can just point people to this MOD and say "Here it is."
And, I think you'll find it very simple to use. Look at the homepage.asp in the zip: <!--#INCLUDE FILE="forum/config.asp" --> <!--#INCLUDE FILE="forum/inc_functions.asp" --> <!--#INCLUDE FILE="forum/inc_top.asp" --> <!--#INCLUDE FILE="forum/inc_news.asp" --> <!--#INCLUDE FILE="forum/inc_footer.asp" -->
IMHO, that's a pretty simple homepage. The www.councilofgrey.com homepage has a couple other proprietary includes (inc_upcoming_events.asp, etc), just to give an example of how this can easily be expanded upon.
|
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 15 July 2002 : 18:19:38
|
Sounds like it is flexible, and that's what I need right now. I have a humble test project at home ... nothing online just as yet. I've put in a few MODs here and there. For the News area I am not sure how I want it to be presented.
It's nice to have a MOD to help with it!
Thanks again,
Etymon
Edited by - Etymon on 15 July 2002 18:20:36 |
|
|
stylishvn
Junior Member
Vietnam
185 Posts |
Posted - 19 July 2002 : 03:19:54
|
quote: If you cannot find what you are looking for, please open a new thread in "Help: Current Version" about that, and I will try to help you there.
I did like you told me, also I sent an email 4 you [ I used popup email here ] but I didnot see ur help wait 4 ur RE
|
|
|
Dan Martin
Average Member
USA
528 Posts |
Posted - 19 July 2002 : 04:08:28
|
The same question is listed in several places. Huwr, I, and others have answered that same question many times. Go to "Search" and type in "left side navigation", searching "All Forums" and you should find about 20 relevant topics. |
|
|
spg
Starting Member
26 Posts |
Posted - 30 July 2002 : 11:22:53
|
quote:
Is there anyway to set a limit (number of characters to display) with a "Read More" link to the actual article ?
I am using an older version of this news code that Dan sent me a long time back. I have done this using the following code- Right after this code -
do while (not rs.EOF)
I added this -
Dim iStartPos, strNewsItem strNewsitem = rs.Fields("T_MESSAGE") iStartPos = InStr(1, strNewsItem, "^", 1) If iStartPos <> 0 Then strNewsItem = Left(strNewsItem, (iStartPos - 2)) strNewsItem = strNewsItem + "...<a href=/forum/topic.asp?TOPIC_ID=" & rs.Fields("TOPIC_ID") & ">[Read More] </a>" End If
Then I replaced this-
<% =formatStr(RemoveSignature(rs.Fields("T_MESSAGE"), rs.Fields("M_SIG"))) %>
With this-
<% =formatStr(RemoveSignature(strNewsItem, rs.Fields("M_SIG"))) %>
This will look for the "^" in the post a put a read more link after it that links to the post in the forum. To get the "^" character to not show up in the forum post, I added a line of code the inc_functions.asp.
Right below this code-
function FormatStr(fString) on Error resume next fString = Replace(fString, CHR(13), "") fString = Replace(fString, CHR(10) & CHR(10), "</P><P>") fString = Replace(fString, CHR(10), "<BR>")
I added this-
fString = Replace(fString, "^", "")
This seems to work well for me. And BTW, nice mod Dan.
|
|
|
Dan Martin
Average Member
USA
528 Posts |
Posted - 31 July 2002 : 02:16:14
|
Hi spg, thanks for the reply. You were one of the people that made me think I should wrap this into a MOD.
I would suggest you look over the MOD because it fixes some bugs (including forgetting to close the DB connection - whoops) that were in the code I sent you.
It also adds an admin panel that lets you change the forum and number of topics which is kind of a nice perk. But, since you understand the code that's probably not enough reason to use it.
|
|
|
Pouyan
New Member
91 Posts |
Posted - 31 July 2002 : 12:42:18
|
spg,
I'm gonna try to add your code as soon as I get home.
I think you may have made my week !!! after struggling with Poreti's Content Display Mod V2 for weeks (which I was unable to get working with snitz 3.3.) I had finally given up on Snitz based content management.
Well it looks like a combination of Dan Martin's mod and your addon might make a neat Snitz content management solution. I hope you guys keep up the good work and add more features to this mod. THANKS !
~pouyan |
|
|
antracit
Starting Member
Sweden
33 Posts |
Posted - 01 August 2002 : 02:32:16
|
Hi just to inform that I’ve installed this Mod. Works perfect! I’ve been laboring with it and extended it to displaying about three news fields . God work!
johan
johan |
|
|
Topic |
|