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/O Code)
 site integration mod w/latest post codes - HELP
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

phoenixtaz13
Junior Member

129 Posts

Posted - 27 February 2009 :  06:13:19  Show Profile  Reply with Quote
another prob that i encountered, i inserted some codes in the inc_site_left.asp, the purpose of it is to get the latest post in some forum i selected, its displaying all the latest post, but when i click the topic, with all the latest post found, it only redirects me to 1 topic, i cant figure out why the links is not working or redirecting to its topic_id.... :(

same process if i insert the in inc_header.asp, but if i insert the code in default.asp, all the links of the latest post found works properly....

heres my file inc_site_left1.txt

am i missing on something?.... :(

thanks in advance.... :)
<

Edited by - phoenixtaz13 on 27 February 2009 06:26:22

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 27 February 2009 :  06:25:59  Show Profile  Reply with Quote
Yep, you're missing something. Insert
rsLatest.MoveFirst
before this line
do until rsLatest.EOF
<
Go to Top of Page

phoenixtaz13
Junior Member

129 Posts

Posted - 27 February 2009 :  06:42:01  Show Profile  Reply with Quote
thanks carefree.... i'll give it a try.... :)

<
Go to Top of Page

phoenixtaz13
Junior Member

129 Posts

Posted - 27 February 2009 :  07:24:34  Show Profile  Reply with Quote
i added the missing part

heres how it looked:
set rsLatest = Server.CreateObject("ADODB.recordset")
strSQL = "Select top 4 T_LAST_POST, T_SUBJECT, TOPIC_ID from FORUM_TOPICS where FORUM_ID like '17%' order by T_LAST_POST desc;"

rsLatest.Open strSQL, latest_conn
rsLatest.MoveFirst
do until rsLatest.EOF 
topic_ID = rsLatest("TOPIC_ID")
t_subject = rsLatest("T_SUBJECT")
t_date = rsLatest("T_LAST_POST")


it still wont work, it wont redirect to the right topic_id.... :(
it keeps on redirecting to topic_id=3

so what i did, i inserted rsLatest.MoveFirst before do until rsLatest.EOF in all my topic forum, and then i get an error... :(

error message:
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/forum/inc_site_left.asp, line 217

apprently line 217 has zero topic, it has no post yet, so i just commented out LINE 217 rsLatest.MoveFirst, and it still wont redirect to the assigned topic_id... with all the topics found, it keeps on redirecting to topic_id=3 which is the last topic from the list... :(

any more ideas?....

thanks for the time.... :)
<

Edited by - phoenixtaz13 on 27 February 2009 07:26:20
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 27 February 2009 :  18:56:16  Show Profile  Reply with Quote
I wrote you an example of pulling the last four topics (with hyperlinked subjects) from the default topics database. Adapt it as you wish....

<!--#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_func_posting.asp"-->
<%
Response.Write	"<table width=""80%"" align=""center"" border=""1"" bgcolor=""" & strTableBorderColor & """ cellpadding=""4"" cellspacing=""2"">" & vbNewLine & _
	"	<tr valign=""middle"">" & vbNewLine & _
	"		<td align=""center"" bgcolor=""" & strHeadCellColor & """ width=""100%"" colspan=""3"">" & vbNewLine & _
	"			<font color=""" & strHeaderFontColor & """ face=""" & strHeaderFontFace & """ size=""" & strHeaderFontSize & """>Last 4 Topics" & vbNewLine & _
	"			</font>" & vbNewLine & _
	"		</td>" & vbNewLine & _
	"	</tr>" & vbNewLine & _
	"	<tr valign=""middle"">" & vbNewLine & _
	"		<font color=""" & strCategoryFontColor & """ face=""" & strCategoryFontFace & """ size=""" & strCategoryFontSize & """>" & vbNewLine & _
	"			<td align=""center"" bgcolor=""" & strCategoryCellColor & """ width=""10%"" colspan=""1""><b><u>Topic ID</u></b>" & vbNewLine & _
	"			</td>" & vbNewLine & _
	"			<td align=""center"" bgcolor=""" & strCategoryCellColor & """ width=""20%"" colspan=""1""><b><u>Posted</u></b>" & vbNewLine & _
	"			</td>" & vbNewLine & _
	"			<td align=""center"" bgcolor=""" & strCategoryCellColor & """ width=""70%"" colspan=""1""><b><u>Subject</u></b>" & vbNewLine & _
	"			</td>" & vbNewLine & _
	"		</font>" & vbNewLine & _
	"	</tr>" & vbNewLine

strSql = "SELECT TOP 4 T_LAST_POST, T_SUBJECT, TOPIC_ID FROM " & strTablePrefix & "TOPICS ORDER BY T_LAST_POST DESC"
set rsGet=my_Conn.Execute(strSql)
if not rsGet.EOF then rsGet.MoveFirst
Do Until rsGet.EOF
	Response.Write	"	<tr valign=""middle"">" & vbNewLine & _
		"		<font color=""" & strForumFontColor & """ face=""" & strForumFontFace & """ size=""" & strForumFontSize & """>" & vbNewLine & _
		"			<td align=""center"" bgcolor=""" & strForumCellColor & """ width=""10%"" colspan=""1"">" & rsGet("TOPIC_ID")& "" & vbNewLine & _
		"			</td>" & vbNewLine & _
		"			<td align=""right"" bgcolor=""" & strForumCellColor & """ width=""20%"" colspan=""1"">" & strtodate(rsGet("T_LAST_POST"))& "" & vbNewLine & _
		"			</td>" & vbNewLine & _
		"			<td align=""left"" bgcolor=""" & strForumCellColor & """ width=""70%"" colspan=""1"">" & vbNewLine & _
		"				<a href=""topic.asp?topic_id=" & rsGet("TOPIC_ID")& """>" & rsGet("T_SUBJECT") & "" & vbNewLine & _
		"				</a>" & vbNewLine & _
		"			</td>" & vbNewLine & _
		"		</font>" & vbNewLine & _
		"	</tr>" & vbNewLine
	rsGet.MoveNext
Loop
set rsGet=Nothing
Response.Write	"</table>" & vbNewLine
WriteFooter
%>
<

Edited by - Carefree on 27 February 2009 19:04:54
Go to Top of Page

phoenixtaz13
Junior Member

129 Posts

Posted - 27 February 2009 :  22:39:26  Show Profile  Reply with Quote
thanks carefree..... :)

i'll give this a try... many, many thanks.... :)

<
Go to Top of Page

phoenixtaz13
Junior Member

129 Posts

Posted - 27 February 2009 :  23:42:52  Show Profile  Reply with Quote
hi carefree,

everything inside my inc_site_left1.asp i replaced it with ur given code above, and i encountered a lot of problems..... :(

ist problem
error message:
Active Server Pages, ASP 0135 (0x80004005)
The file 'inc_header.asp' is included by itself (perhaps indirectly). Please check include files for other Include statements.
/forum/inc_site_left1.asp, line 3

my solution, i removed the <!--#INCLUDE FILE="inc_header.asp" -->

2nd problem
Error message:
Microsoft VBScript compilation (0x800A0411)
Name redefined
/forum/inc_adovbs.asp, line 14, column 6

my solution, i removed the <!--#INCLUDE FILE="config.asp" -->

3rd problem
error message:
Microsoft VBScript compilation (0x800A0411)
Name redefined
/forum/inc_sha256.asp, line 42, column 8

my solution, i removed the <!--#INCLUDE FILE="inc_sha256.asp" -->

4th problem
error message:
ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
/forum/Default.asp, line 111


my solution, i inserted this at the top
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/forum/db/snitz.mdb")
set my_conn=Server.CreateObject("ADODB.Connection")
my_conn.Open strConnString


and i still get this error:
ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
/forum/Default.asp, line 111

what will i do next?...

and i also wonder why my own code wont work properly.... i even made a file latest.asp, and saved all my codes in it, and then inserted this<!--#INCLUDE FILE="latest.asp" --> in inc_header.asp right after <!--#INCLUDE FILE="config.asp" -->, but the problem to it when i click the found latest hyper link post topic, it only redirects me to topic_id=3.... and if i insert this<!--#INCLUDE FILE="latest.asp" --> in default.asp right after <!--#INCLUDE FILE="config.asp" -->, the found latest hyper link post topic works properly..... but if i do that, i have to insert this <!--#INCLUDE FILE="latest.asp" --> to all asp page(like member.asp, active.asp, register.asp, etc...).

any ideas to why its acting strangely?....

thanks for ur time.... :)
<

Edited by - phoenixtaz13 on 28 February 2009 00:29:20
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 28 February 2009 :  03:16:42  Show Profile  Reply with Quote
quote:
inside my inc_site_left1.asp i replaced...


That's the first problem.... You cannot use "includes" within an include that is called from a page which already uses those files. I wrote this as a stand-alone example page. You'll discover that if you simply call this from the address bar, it'll work properly.

To rectify the problems; you must make sure that any required file which is NOT included (on the page which calls your left-side script) is contained here. The rest of the includes (the duplicates) should be removed. So your actions in problems 1-3 were correct.

quote:

4th problem
error message:
ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
/forum/Default.asp, line 111



This problem isn't referring to an error with the code I wrote for "inc_site_left.asp" but with "default.asp", and that's why your fix didn't have any effect. You may want to review the code in "default.asp" immediately prior to line 111.<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 28 February 2009 :  03:36:32  Show Profile  Reply with Quote
Go to Top of Page

phoenixtaz13
Junior Member

129 Posts

Posted - 28 February 2009 :  05:32:54  Show Profile  Reply with Quote
hello carefree..... :)

i'll give the new code a try.... thanks.... :)

btw, i've notice, here in snitz at the very bottom, i see this "This page was generated in 0.11 seconds." how can i activate mine?... or its a mod?... if yes, where can i download it?...

thanks for ur time.... ur the greatest!.... :)
<
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 28 February 2009 :  08:01:41  Show Profile  Visit AnonJr's Homepage  Reply with Quote
Its at the bottom of "Feature Configuration" in your Admin Options. Set "Show Timer" to "On"
Go to Top of Page

phoenixtaz13
Junior Member

129 Posts

Posted - 01 March 2009 :  03:08:10  Show Profile  Reply with Quote
thanks carefree... no more probs... many, many thanks.... :)

thanks anonjr, activated it already... :)

Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 01 March 2009 :  05:03:18  Show Profile  Reply with Quote
You're welcome.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07