Author |
Topic |
snaayk
Senior Member
USA
1061 Posts |
Posted - 02 February 2002 : 01:33:30
|
MOD: News Page Author: Tony Basallo aka, snaayk Version: 1.2 Diffulculty: 2
Download: http://www.realmslore.com/files/newspage_MOD.zip Demo: http://www.realmslore.com
What it does: This mod will select the topics (only topics) from a given forum and display them on a separate page. To be used as a News section for a homepage or as a dedicated page in itself. Very easy to customize the way it displays if you are a bit familiar with what the code looks like. The variables are set in an include file and everything else is taken care of.
An admin or the poster can edit,delete or make a new post via the link available on the individual post (avoiding going to the forum to accomplish this).
The main page will show x amount of posts. Another page will show everything else not listed on the main page. And yet another page will list all the items that have been archived through the forum. This page will show a list that will link to the post itself, displaying it individually. This will avoid displaying 100 topics on a page or creating a paging system. Only the subject is shown and this will link to the post. I have no demo of this since I deleted my archived posts while testing.
The only problem I see now is that if there are fewer than the amount of posts you do not want to show on the secondary page it will show nothing. I am working on this, and I might post an update, if i find one
Edited by - snaayk on 08 February 2002 13:28:50
Edited by - snaayk on 01 April 2002 18:42:01 |
|
Warren UK
Starting Member
United Kingdom
29 Posts |
Posted - 02 February 2002 : 16:25:54
|
The zip file I downloaded doesn't have the file inc_news.asp included in it.... So I was unable to try this out.
|
|
|
snaayk
Senior Member
USA
1061 Posts |
Posted - 02 February 2002 : 23:34:30
|
quote:
The zip file I downloaded doesn't have the file inc_news.asp included in it.... So I was unable to try this out.
ZIP updated.
|
|
|
netanel
New Member
Israel
89 Posts |
Posted - 03 February 2002 : 04:02:57
|
he write:
Microsoft VBScript compilation error '800a040e'
'loop' without 'do'
/snitz/newscurrent.asp, line 41
loop ^
|
|
|
snaayk
Senior Member
USA
1061 Posts |
Posted - 03 February 2002 : 12:03:02
|
quote:
he write:
Microsoft VBScript compilation error '800a040e'
'loop' without 'do'
/snitz/newscurrent.asp, line 41
loop ^
You shoyuld hav ethe following code on newscurrent ending on 42 or 43. Is this what you have?
if rsNews.eof or rsNews.bof then
Response.Write " <br> <br>No Current News Found, Please Check Back Soon"
else
do while not rsNews.eof iRecNum = IRecNum + 1 if iRecNum < 6 then %>
<table width="99%" cellpadding="0" cellspacing="0" border="0"> <tr> <td colspan="3"><font color="red" face="<% =strDefaultFontFace %>" size="5"><% =rsNews("T_SUBJECT")%></font></td> </tr> <tr> <td colspan="3" height="10"><font size="<% =strFooterFontSize %>">[posted by <a href="/forum/pop_profile.asp?mode=display&id=<% =rsNews("MEMBER_ID")%>"><b><%=rsNews("M_NAME")%></b></a> on <%= ChkDate(rsNews("T_DATE")) %>]</font> <% if mlev = 4 or strDBNTUserName = rsNews("M_NAME") then %> <a href="/forum/post.asp?method=EditTopic&TOPIC_ID=<% =rsNews("TOPIC_ID") %>&FORUM_ID=<% =forumid %>&CAT_ID=<% =catid %>&auth=2&Forum_Title=<% =forumtitle %>&Topic_Title=<%=rsNews("T_SUBJECT") %>"><img src="/images/icon_pencil.gif" border="0"></a> <a href="JavaScript:openWindow('/forum/pop_delete.asp?mode=Topic&TOPIC_ID=<% =rsNews("Topic_ID") %>&FORUM_ID=<% =forumid %>&CAT_ID=<% =catid %>&Topic_Title=<% =rsNews("T_SUBJECT") %>')"><img src="/images/icon_folder_delete.gif" alt="Delete Topic" border=0></a> <a href="/forum/post.asp?method=Topic&FORUM_ID=<% =forumid %>&CAT_ID=<% =catid %>&Forum_Title=<% =forumtitle %>"><img src="/images/icon_folder_new_topic.gif" border=0></a> <% end if %> </td> </tr> <tr><td colspan="3" height="10"> </td></tr> <tr> <td colspan="3"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><%=rsNews("T_MESSAGE")%><br></font></td> </tr> </table>
<% rsNews.Movenext loop rsNews.Close() end if %>
|
|
|
netanel
New Member
Israel
89 Posts |
Posted - 03 February 2002 : 14:30:45
|
yes that wate i have
|
|
|
snaayk
Senior Member
USA
1061 Posts |
Posted - 03 February 2002 : 18:24:03
|
quote:
yes that wate i have
Wht is the url for your forum and what is the name that you are going to use for the news page?
|
|
|
netanel
New Member
Israel
89 Posts |
Posted - 04 February 2002 : 00:55:24
|
u will not understant the page name & wate wrute in cose it's in hebrew.....
|
|
|
netanel
New Member
Israel
89 Posts |
Posted - 04 February 2002 : 01:15:12
|
on wate db it work?
|
|
|
Warren UK
Starting Member
United Kingdom
29 Posts |
Posted - 04 February 2002 : 08:42:14
|
The code quoted is an END IF short....
In the middle of the code you have one <% end if %> statement.
I think you need two, placement of the second one I'm unsure of.
Looking at the code I can see three IF statements and two END IFs.
Can't test this though I'm at work.
Edited by - Warren UK on 04 February 2002 08:49:11 |
|
|
Dan Martin
Average Member
USA
528 Posts |
Posted - 04 February 2002 : 12:17:12
|
I've made a MOD similar to this myself (see http://www.councilofgrey.com). Assuming your MOD supports it, I find this works best by using the feature to Moderate New Posts for that forum. By doing that anyone can post news, but it doesn't show up on your News page until you accept the submission. But anyone can reply to it. That works out pretty nicely.
Just a suggestion for people who implement this. |
|
|
snaayk
Senior Member
USA
1061 Posts |
Posted - 04 February 2002 : 14:39:24
|
quote:
on wate db it work?
SQL and Access, both working.
quote: The code quoted is an END IF short....
In the middle of the code you have one <% end if %> statement.
I think you need two, placement of the second one I'm unsure of.
Looking at the code I can see three IF statements and two END IFs.
Can't test this though I'm at work.
Hmm..Its working at my site but I may have changed something when I took out my site specific code. I will check when I get home and respond.
|
|
|
snaayk
Senior Member
USA
1061 Posts |
Posted - 04 February 2002 : 20:03:38
|
The zip has been updated, I also added that file by itself in case you didnt want to download the entire thing. I had in fact removed an end if by mistake.
|
|
|
corkadmin
Junior Member
USA
113 Posts |
Posted - 04 February 2002 : 20:58:04
|
I was wondering, do you have your mod that you can upload or can you send it to me?
CA
quote:
I've made a MOD similar to this myself (see http://www.councilofgrey.com). Assuming your MOD supports it, I find this works best by using the feature to Moderate New Posts for that forum. By doing that anyone can post news, but it doesn't show up on your News page until you accept the submission. But anyone can reply to it. That works out pretty nicely.
Just a suggestion for people who implement this.
Sic Parvis Magnum - Small Things Have Great Beginnings |
|
|
stuF
Average Member
United Kingdom
561 Posts |
Posted - 05 February 2002 : 04:30:56
|
i have somthing like this on my home computer, ive added options to sen PM to poster, email poster, view members profile etc.
If anyone wants the code just give me the word and ill post it here, its safe as houses, i used it for every notch of content on my site before it went down.
snitz all dolled up @ http://36-degrees.co.uk/cgi-bin/forum/ |
|
|
Dan Martin
Average Member
USA
528 Posts |
Posted - 06 February 2002 : 14:01:41
|
quote:
I was wondering, do you have your mod that you can upload or can you send it to me?
CA
quote:
I've made a MOD similar to this myself (see http://www.councilofgrey.com). Assuming your MOD supports it, I find this works best by using the feature to Moderate New Posts for that forum. By doing that anyone can post news, but it doesn't show up on your News page until you accept the submission. But anyone can reply to it. That works out pretty nicely.
Just a suggestion for people who implement this.
Sic Parvis Magnum - Small Things Have Great Beginnings
I don't have it available for download - since I've not taken the time to make it stand alone. I can however send you the code I use. Feel free to drop me an email, or send me a Instant Message. All my contact info is available on my profile.
Just FYI - I am connected to every IM network 24/7, but I won't see your IM until I get home from work.
|
|
|
Topic |
|