The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
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.... :)
<
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.... :)
<
آخرین ویرایش توسط
نوشته شده در
Yep, you're missing something. Insert before this line <
Code:
rsLatest.MoveFirstCode:
do until rsLatest.EOF
نوشته شده در
thanks carefree.... i'll give it a try.... :)
<
<
نوشته شده در
i added the missing part
heres how it looked:
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.... :)
<
heres how it looked:
Code:
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.... :)
<
آخرین ویرایش توسط
نوشته شده در
I wrote you an example of pulling the last four topics (with hyperlinked subjects) from the default topics database. Adapt it as you wish....<
Code:
<!--#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
%>
آخرین ویرایش توسط
نوشته شده در
thanks carefree..... :)
i'll give this a try... many, many thanks.... :)
<
i'll give this a try... many, many thanks.... :)
<
نوشته شده در
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:
my solution, i inserted this at the top
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.... :)
<
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:
Code:
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 111my solution, i inserted this at the top
Code:
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 strConnStringand 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.... :)
<
آخرین ویرایش توسط
نوشته شده در
4th problem
error message:Code: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.<
نوشته شده در
نوشته شده در
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!.... :)
<
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!.... :)
<
نوشته شده در
Its at the bottom of "Feature Configuration" in your Admin Options. Set "Show Timer" to "On"
Email Member
Message Member
Post Moderation
بارگزاری فایل
If you're having problems uploading, try choosing a smaller image.
پیشنمایش مطلب
Send Topic
Loading...