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)
 Topic Maker (Static META Tag)
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 5

eggyfarts
Junior Member

New Zealand
200 Posts

Posted - 30 September 2002 :  23:16:49  Show Profile
Don't worry, I got it to work.

Thanks for the adaptedfloyd.txt file floyd, it works wonders . I just setup admin_topic_make.asp to open adaptedfloyd.asp, so that I can make the static pages and then make the index file in one go.

It's great!

Cheers,
WeeVaa.

Go to Top of Page

cyclingdude
New Member

68 Posts

Posted - 02 October 2002 :  22:05:48  Show Profile
Yikes - I've about given up here! :(

Well, anyone with ASP/Snitz experience have an idea on how to make this MOD *not* spit out all the posts from your private/hidden forums?
Go to Top of Page

cyclingdude
New Member

68 Posts

Posted - 06 October 2002 :  14:41:21  Show Profile
Classic (or anyone with some ASP knowledge and 2 minutes of your time),

Have you had any ideas on this? I don't have the ASP experience or know-how to do it.. but it looks like you just need to add a couple of lines of code (and IF-THEN) that checks to see whether the topic is in a private/hidden forum or not before it writes it out to an .asp file.

Edited by - cyclingdude on 06 October 2002 14:41:50
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 06 October 2002 :  20:11:27  Show Profile
Cyclingdude,

I have not had the time, but it should be possible. I have had to take some time out of work to answer a few things here. I shall look at it, but not sure when.

The wife complains too much already. She keeps telling me the new house planning is more important than computers... Just cause computers are paying for the house don't mean a thing to her.. *LOL*

I am trying to get a new site online, which was meant to be on 2 weeks ago, but haven't found the time for that. And I am only 20% finished on that.

If anyone else can help in the mean time, we can all work together on it and maybe with a group of us, we can work it out.

Cheers,

David Greening
Go to Top of Page

beznas
Starting Member

Morocco
23 Posts

Posted - 09 October 2002 :  02:37:34  Show Profile
quote:
Originally posted by cyclingdude

Yikes - I've about given up here! :(

Well, anyone with ASP/Snitz experience have an idea on how to make this MOD *not* spit out all the posts from your private/hidden forums?



Assuming that the Cat you don't want to list is 2, try this:
1- Find this line:

set countrs = my_conn.execute("SELECT CAT_ID FROM " & strTablePrefix & "TOPICS")


Replace with:

set countrs = my_conn.execute("SELECT CAT_ID FROM " & strTablePrefix & "TOPICS WHERE CAT_ID <> 2")



Let me know how you make out?

P.S. the guy who told you that he has no time for this is B/S/ing you. All it takes is exactly 17 keystrokes.




Free Palestine!

Edited by - beznas on 09 October 2002 02:55:00
Go to Top of Page

beznas
Starting Member

Morocco
23 Posts

Posted - 09 October 2002 :  03:19:15  Show Profile
quote:
Originally posted by James

[quote]Originally posted by jay_v

Yes it's clear to me that the static pages are indexable. But from what I understand, search engines are able to add pages to their database only by jumping from link to link and indexing each new page as it is found. But if the static pages aren't linked by anything, how can the search engine find it?




To solve this problem and have a better indexing by the robots. I made a little script that lists all the files in your /topics/ and writes them as links. The robots love to spider this.

1- Make a file called robots.asp and put it in your forums folder

2- Drop these lines in it:


<HTML>
<body link="#000000" vlink="#000000">

<table border=0 cellpadding=3 cellspacing=0 bgcolor="#F7F7F7">
<tr bgcolor="#000000"><td bgcolor="#F5F5F5">

<%
Set Objekt=Server.CreateObject("Scripting.FileSystemObject")
Set Folder=Objekt.GetFolder(Server.MapPath("topics"))
FOR EACH beznas in Folder.Files
%> </font>
<tr>
<td bgcolor="#E9E9E9">
<font face="Verdana" size="1">
<a href="topics/<%=beznas.Name%>"><%=beznas.Name%></a>
</td>
</tr>
<tr>
<%
NEXT
%>
</font>
</table>
</body>
</html>



Free Palestine!

Edited by - beznas on 09 October 2002 03:24:25
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 09 October 2002 :  06:31:39  Show Profile
Beznas,

It might take 17 keystrokes to type that, but it takes a lot more time to find that you only need the 17 keystrokes. I have a heap of stuff on with no time for trying to work out stuff that could take a while. So don't make out the big hero. You was B/S/ing as you put it.
quote:
Originally posted by beznas

P.S. the guy who told you that he has no time for this is B/S/ing you. All it takes is exactly 17 keystrokes.
As you take the time to say it only takes a few key strokes, you can take over the mod, hero..

Beznas is now the expert on this mod, everyone please ask him for advice.

By the way, your code did not work.
quote:
Originally posted by beznas

set countrs = my_conn.execute("SELECT CAT_ID FROM " & strTablePrefix & "TOPICS")

Replace with:

set countrs = my_conn.execute("SELECT CAT_ID FROM " & strTablePrefix & "TOPICS WHERE CAT_ID <> 2")

Edited by - Classicmotorcycling on 09 October 2002 06:46:04
Go to Top of Page

cyclingdude
New Member

68 Posts

Posted - 09 October 2002 :  20:23:57  Show Profile
Classic..

C'mon man, it's still your MOD. I'll wait for you to get a chance to look at it and help me out.

Thanks!
Go to Top of Page

James
Average Member

USA
539 Posts

Posted - 31 October 2002 :  23:46:11  Show Profile  Visit James's Homepage
OK, I got to messing around with this a little and changed it to
output htm files instead of asp (more search engine friendly)and it
now writes a index file with links to all the files and a title for
each link. I also changed the number of topics to a hardcoded value.
Find your latest post and look at the URL of it to get the number
example: forum.snitz.com/forum/post.asp?method=Reply&TOPIC_ID=33931&FORUM_ID=25)

Change the value for ListTopic to reflect it.

Here is how my file looks (make appropriate changes to red code):


<%Server.ScriptTimeout = 10000%>
<%
'#################################################################################
'## Copyright (C) 2000-02 Michael Anderson, Pierre Gorissen,
'##                       Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
'##
'## Support can be obtained from support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## reinhold@bigfoot.com
'##
'## or
'##
'## Snitz Communications
'## C/O: Michael Anderson
'## PO Box 200
'## Harpswell, ME 04079
'#################################################################################
%>

<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_subscription.asp" -->
<!--#INCLUDE FILE="inc_moderation.asp" -->
<%if (mLev = 4) then
AdminAllowed = 1
else 
AdminAllowed = 0
end if
%>
<table align="center" width="60%" border=0>
<tr>
<td nowrap align="left">
<%
if AdminAllowed = 1 then
'## modified
	strWrite2 = ""
	strWrite2 = strWrite2 & "<html><head>"
	strWrite2 = strWrite2 & "<meta name=""description"" content=""RC Web Board host several Radio Control forums covering all forms of the Radio Control hobby."">"
	strWrite2 = strWrite2 & "<meta name=""keywords"" content=""Web Board, Radio Control, RC, forums, discussion, message, board, hobby, sale, buy, trade, remote, control, rc, post"">"
	strWrite2 = strWrite2 & "<title>RC Web Board topics</title>"
	strWrite2 = strWrite2 & "</head><body>"
	strWrite2 = strWrite2 & "<p></p>"
	strWrite2 = strWrite2 & "<h1>RC Web Board topics and replies</h1>"
	strWrite2 = strWrite2 & "<p></p>"
'## end modified	
'set countrs = my_conn.execute("SELECT CAT_ID FROM " & strTablePrefix & "TOPICS")
'	ListTopic = 0
'    do until countrs.eof
'    	ListTopic = ListTopic + 1
'    countrs.movenext
'    Loop
set countrs = nothing
'## modified from above lines
ListTopic = 3400
'## end of modified
strTotalTopics = ListTopic
'strSql = strSql & "SELECT T_COUNT FROM FORUM_TOTALS" & Topics
'write_this = Request.QueryString("TOPIC_ID")
'for write_this = 1 to ListTopic
for write_this = 1 to ListTopic
strSql = "SELECT FORUM_ID, CAT_ID, T_AUTHOR, T_SUBJECT, T_MESSAGE "
strSql = strSql & " FROM FORUM_TOPICS "
strSql = strSql & " WHERE TOPIC_ID = " & write_this
'response.write strSql
set rsWrite = my_Conn.Execute (strSql)
strStatus = ""
strWrite = ""
if rsWrite.Bof and rsWrite.eof then
strStatus = "<b>No such topic found.</b>"
else
set rsGetForum = my_Conn.Execute ("SELECT F_SUBJECT FROM FORUM_FORUM WHERE FORUM_ID =" & rsWrite("FORUM_ID"))
forum_name = rsGetForum("F_SUBJECT")
themessage = rsWrite("T_MESSAGE")
strWrite = strWrite & "<html><head><title>" & strForumTitle & " (© 2002) - " & rsWrite("T_SUBJECT") & "</title>"
strWrite = strWrite & "<meta http-equiv=""Refresh"" content=""5; URL=" & strForumURL & "topic.asp?TOPIC_ID=" & write_this & """>"
strWrite = strWrite & "<meta name=""Description"" CONTENT=""" & strForumTitle & " (© 2002) - " & rsWrite("T_SUBJECT") & """>"
strWrite = strWrite & "<meta name=""Keywords"" CONTENT=""" & rsWrite("T_SUBJECT") & " " & Replace(themessage, Chr(13) & Chr(10), "") & """>"
strWrite = strWrite & "<table width=""100%"" border=""1"" cellpadding=""2"" cellspacing=""1"" bordercolor=""#3366CC""><tr><td align=""center"" colspan=""2""><b>" & rsWrite("T_SUBJECT") & "</b></td></tr>"
strWrite = strWrite & "<tr><td align=""center"" valign=""top""><b>" & getMemberName(rsWrite("T_AUTHOR")) & "</b></td>"
strWrite = strWrite & "<td>" & themessage & "</td></tr>"
'## modified
strWrite2 = strWrite2 & "<p><a href=""http://www.yourdomain.com/forum/topics/" & write_this & ".htm" & """>topic #" & write_this & "</a> - " & rsWrite("T_SUBJECT") & ".</p>"
'## end modified			
strSql2 = "SELECT R_AUTHOR, R_MESSAGE "
strSql2 = strSql2 & " FROM FORUM_REPLY "
strSql2 = strSql2 & " WHERE TOPIC_ID = " & write_this
'response.write strSql
set rsWriteReply = my_Conn.Execute (strSql2)

do until rsWriteReply.eof
strWrite = strWrite & "<tr><td align=""center"" valign=""top""><b>" & getMemberName(rsWriteReply("R_AUTHOR")) & "</b></td>"
strWrite = strWrite & "<td>" & rsWriteReply("R_MESSAGE") & "</td></tr>"
rsWriteReply.MoveNext
loop

strWrite = strWrite & "</table>"

Set ObjTopicFile = Server.CreateObject("Scripting.FileSystemObject")
TopicFile = Server.MapPath ("../forum/topics/" & write_this & ".htm") 
Set WriteTopicFile = ObjTopicFile.CreateTextFile (TopicFile, True)
WriteTopicFile.WriteLine(strWrite)
WriteTopicFile.Close
Set WriteTopicFile = Nothing
Set ObjTopicFile = Nothing


strStatus = "<b>Success.</b>"

end if 
Response.write "<b>Done processing topic number " & write_this & ".</b> - "& strStatus & "<br>"
next
'## modifed
Response.write "<b>Writing index file</b>"
Set ObjTopicFile = Server.CreateObject("Scripting.FileSystemObject")
TopicFile = Server.MapPath ("../forum/topics/index.htm") 
Set WriteTopicFile = ObjTopicFile.CreateTextFile (TopicFile, True)
WriteTopicFile.WriteLine(strWrite2)
WriteTopicFile.Close
Set WriteTopicFile = Nothing
Set ObjTopicFile = Nothing
Response.write "<b>Finished.</b>"
else
Response.write "You are not authorized to do this action."
End if
%>
</td>
</tr>
</table>
<!--#INCLUDE FILE="inc_footer.asp" -->



Note that if your forum has more than a few hundred post
that this script will take quite a while to run. I usually
just execute it and walk away for a while. The original post
has the file named admin_topic_maker.asp and a link
added to the admin home page. But you can execute it directly
through the URL to it (thats the way i run it) if you prefer.

*Interested in Radio Control*
*The RC Web Board - http://www.rcwebboard.com/*
Go to Top of Page

James
Average Member

USA
539 Posts

Posted - 31 October 2002 :  23:59:58  Show Profile  Visit James's Homepage
You can see the index file it outputs at
http://www.rcwebboard.com/forum/topics/index.htm.
The topic #'s are missing because I misspelled a varible
(fixed before the post above) and it's late (going to bed
after this post). If you want it to just make the post
titles the link, then you could change the line
that reads:
strWrite2 = strWrite2 & "<p><a href=""http://www.yourdomain.com/forum/topics/" & write_this & ".htm" & """>topic #" & write_this & "</a> - " & rsWrite("T_SUBJECT") & ".</p>"

to this instead:
strWrite2 = strWrite2 & "<p><a href=""http://www.yourdomain.com/forum/topics/" & write_this & ".htm" & """>" & rsWrite("T_SUBJECT") & "</a></p>"

*Interested in Radio Control*
*The RC Web Board - http://www.rcwebboard.com/*
Go to Top of Page

cyclingdude
New Member

68 Posts

Posted - 01 November 2002 :  13:18:53  Show Profile
James,

Thanks for taking a look at this mod and for these changes. Could you please help me with this problem... I want to prevent the mod from outputting topics from my private forums or forums where a password is required, for example. Is there any way you can see doing this?

Thanks man.. and great work! I'm not an ASP programmer and have been trying to do this for the last month. Any help would be appreciated... and it would probably be beneficial to other Admins out there who want to use this mod, but don't want every single post (especially the private/hidden ones) getting crawled and indexed in google!
Go to Top of Page

snerdley
New Member

USA
65 Posts

Posted - 02 November 2002 :  01:59:07  Show Profile
I also get the "no such topic found" error. I have the folder /topics setup in the root, with write permission. Anyone ever figure this one out?

snerd

Go to Top of Page

James
Average Member

USA
539 Posts

Posted - 03 November 2002 :  03:25:34  Show Profile  Visit James's Homepage
cyclingdude, I noticed that you were trying to block a category in a previous post so try the following and let me know if it works for you.

Add the lines in red to the following part:


set rsWrite = my_Conn.Execute (strSql)
strStatus = ""
strWrite = ""
if rsWrite.Bof and rsWrite.eof then
strStatus = "<b>No such topic found.</b>"
elseif rsWrite("CAT_ID") = 1 then
strStatus = "<b>No such topic found.</b>"
else
set rsGetForum = my_Conn.Execute ("SELECT F_SUBJECT FROM FORUM_FORUM WHERE FORUM_ID =" & rsWrite("FORUM_ID"))
forum_name = rsGetForum("F_SUBJECT")
themessage = rsWrite("T_MESSAGE")


Change the Category number to match the category number that you don't want to be output.

*Interested in Radio Control*
*The RC Web Board - http://www.rcwebboard.com/*
Go to Top of Page

cyclingdude
New Member

68 Posts

Posted - 03 November 2002 :  17:53:24  Show Profile
James, brilliant!

Thanks so much.. In fact, now that you showed me how to do this.. I easily modfied to the code to exclude by Forum_IT - rather than Cat_ID..

so I'm doing it like this...

elseif rsWrite("FORUM_ID") = 2 then
strStatus = "<b>No such topic found.</b>"
elseif rsWrite("FORUM_ID") = 8 then
strStatus = "<b>No such topic found.</b>"

And so forth for all the forums I don't want dumped out.

Also, excellent idea about generating the Index file!!! That makes so much sense...

Thanks again! Let's see how it helps.. hope the spider index all my content now!

Has it worked for you?
Go to Top of Page

James
Average Member

USA
539 Posts

Posted - 03 November 2002 :  21:22:11  Show Profile  Visit James's Homepage
Glad it worked out for you. About the index file, you may also want
to put a link to it on your homepage so that the bots have a path to
follow to it. a simply underscore or image with a hyperlink in a
inconspicuous place should work.

*Interested in Radio Control*
*The RC Web Board - http://www.rcwebboard.com/*
Go to Top of Page
Page: of 5 Previous Topic Topic Next Topic  
Previous Page | 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.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07