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)
 MOD: Static META Tag Generator (For search bots)
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

dayve
Forum Moderator

USA
5820 Posts

Posted - 17 November 2001 :  16:22:11  Show Profile  Visit dayve's Homepage
UPDATED: 11.22.2001

This little script will generate static HTML pages with META Tags so that spiders and bots will be able to store topic discussions in Search Engines. I had my doubts at first that this would work but Iron Heart of http://www.someplacesomewhere.com has proven in fact that it does.

Here is a demo of the pages that are created:
http://www.nineinchnailz.com/forum/topics
http://dayve.d2g.com:666/forum/topics/

if you double click on any html file it will redirect you to the actual forum topic. Viewing the source of that html file will show the META tag descriptions pertaining to that subject.

Installation:

Create a directory named topics that has WRITE permissions (uses fso object)

Download, modify and upload script in forum directory:

topicmaker.asp


Run the script which will take awhile to run and wait for confirmation message to appear.

All Done!! I have recorded google, alta vista and other search engines reading this directory as well as now seeing my forum topics in search engine queries.


____________
dayve
http://www.nineinchnailz.com/forum

Edited by - dayve on 17 November 2001 16:27:20

Edited by - dayve on 18 November 2001 17:56:56

Edited by - dayve on 22 November 2001 17:12:02

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 17 November 2001 :  16:25:33  Show Profile  Visit Azaniah's Homepage
The link for example gives an error.

Az

-------
Eagles fly!, but weasels don't get sucked into jet engines.
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 17 November 2001 :  16:27:40  Show Profile  Visit dayve's Homepage
fixed.

____________
dayve
http://www.nineinchnailz.com/forum
Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 17 November 2001 :  16:38:14  Show Profile  Visit Azaniah's Homepage
Thanks - yeah thats pretty good

Cheers Az

-------
Eagles fly!, but weasels don't get sucked into jet engines.
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 17 November 2001 :  17:02:08  Show Profile
bump, I have emailed it to you, dayve.

____
"I am a legal alien"

Edited by - blackinwhite on 17 November 2001 17:08:24
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 17 November 2001 :  18:31:09  Show Profile  Visit dayve's Homepage
quote:

bump, I have emailed it to you, dayve.

____
"I am a legal alien"

Edited by - blackinwhite on 17 November 2001 17:08:24



what email addy? I haven't gotten anything..

____________
dayve
http://www.nineinchnailz.com/forum
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 17 November 2001 :  19:08:00  Show Profile
I have just the email in your profile to inform you that; by using the .htm files, for example I can see the topic:

I can't see http://www.nineinchnailz.com/forum/link.asp?TOPIC_ID=121 it says:
There Was A Problem

You are not logged in.

Go Back To Enter Data

Return to the forum

, but I can see http://www.nineinchnailz.com/forum/topics/121.htm .

____
"I am a legal alien"

Edited by - blackinwhite on 17 November 2001 19:10:21
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 17 November 2001 :  19:33:10  Show Profile  Visit dayve's Homepage
works for me...

just realized, that was a Private Forum for members only, that's why... guess I should tweak the script to omit private items...

____________
dayve
http://www.nineinchnailz.com/forum

Edited by - dayve on 17 November 2001 19:34:18
Go to Top of Page

aavorio
Starting Member

10 Posts

Posted - 17 November 2001 :  20:33:13  Show Profile
Hi,

There is an error with this scripts.
Look:

Microsoft VBScript compilation error '800a03f6'

Expected 'End'

/forum/topicmaker.asp.asp, line 62

My Code:

<%Server.ScriptTimeout = 10000%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top.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
'write_this = Request.QueryString("TOPIC_ID")
for write_this = 1 to 1801 ' <<== manually set how many topics to read and create html files
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>" & rsWrite("T_SUBJECT") & "</title>"
strWrite = strWrite & "<meta http-equiv=""Refresh"" content=""2; URL=http://www.myForum.com/forum/topic.asp?TOPIC_ID=" & write_this & "&FORUM_ID=" & rsWrite("FORUM_ID") & "&CAT_ID=" & rsWrite("CAT_ID") & "&TOPIC_TITLE=" & rsWrite("T_SUBJECT") & "&FORUM_TITLE=" & FORUM_NAME & """>"
strWrite = strWrite & "<meta name=""Description"" CONTENT=""" & rsWrite("T_SUBJECT") & """>"
strWrite = strWrite & "<meta name=""Keywords"" CONTENT=""" & rsWrite("T_SUBJECT") & " " & Replace(themessage, Chr(13) & Chr(10), "") & """>"
strWrite = strWrite & "</head><body>"
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>"

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></body></html>"

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

[62] strStatus = "<b>Success.</b>"

%>

Thanks!

Edited by - aavorio on 17 November 2001 20:34:20
Go to Top of Page

simonduz
Junior Member

161 Posts

Posted - 17 November 2001 :  23:06:32  Show Profile  Visit simonduz's Homepage  Send simonduz an ICQ Message  Send simonduz a Yahoo! Message
This is freakin slick.

Thanks for the great script.
Simonduz
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 18 November 2001 :  01:04:59  Show Profile  Visit dayve's Homepage
aavorio, the script runs just fine, try again...

____________
dayve
http://www.nineinchnailz.com/forum
Go to Top of Page

vinnyio
Starting Member

13 Posts

Posted - 18 November 2001 :  15:53:11  Show Profile
I get this error too and could not find the answer to it.

Microsoft VBScript compilation error '800a03f6'

Expected 'End'

/forums/topicmaker.asp, line 62


Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 18 November 2001 :  16:03:36  Show Profile  Visit dayve's Homepage
I'm sorry, I think I know why and I think I pointed it out in the original post.

for write_this = 1 to 2000 ' <<== manually set how many topics to read and create html files

this is a hard coded value, if you don't have 2000 topics then you will end up with an EOF error. I guess I should make this dynamic but in the meantime, set this value to a number lower than or equal to the number of topics on yor forum...

____________
dayve
http://www.nineinchnailz.com/forum
Go to Top of Page

vinnyio
Starting Member

13 Posts

Posted - 18 November 2001 :  16:23:20  Show Profile
Thanks for that but I am still testing my forums and have only 3 test topics so I set it = 1 to 3 and still get the same error I did the same with 1 to 2 and same error

I dont need to CHMOD anything as I am on Nt

Any ideas. Its not that really important but would be very handy.

Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 18 November 2001 :  16:28:10  Show Profile
quote:

works for me...

just realized, that was a Private Forum for members only, that's why... guess I should tweak the script to omit private items...


Dayve,
could you check out the issue about private forums?

____
e? - Online Life and Design Culture-new!!


Edited by - blackinwhite on 18 November 2001 16:30:24
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 18 November 2001 :  16:44:13  Show Profile  Visit dayve's Homepage
quote:

Thanks for that but I am still testing my forums and have only 3 test topics so I set it = 1 to 3 and still get the same error I did the same with 1 to 2 and same error

I dont need to CHMOD anything as I am on Nt

Any ideas. Its not that really important but would be very handy.





the idea behind this is very simple so we will get it working. so now I ask Snitz v 3.1 or 3.3?

also, this is VERY important

quote:

Create a directory named topics that has WRITE permissions (uses fso object)



____________
dayve
http://www.nineinchnailz.com/forum

Edited by - dayve on 18 November 2001 16:45:42
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
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.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07