blog mod - help

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/68382?pagenum=1
05 November 2025, 10:21

Topic


phoenixtaz13
blog mod - help
12 March 2009, 06:07


good day to all.... :)

i cant seem to find my old post... :(

anyways, carefree assisted me on this mod... everything were working fine... until i ran into this prob.... when i decided to lock the post or topic i encountered an error...
heres the error message:
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'objRec'
/forum/blogs.asp, line 160

and it points out to the one in red:
set objRec = my_Conn.Execute(strSql)
DTString = " WebBlogs "
if not objRec.BOF and not objRec.EOF then
if Request.QueryString("member") <> "" or Request.QueryString("log_id") <> "" then
DTString = " <a href=""blogs.asp?member=" & objRec("MEMBER_ID") & """>Back to " & objRec("M_NAME") & "'s Blog list</a>"
end if
else
DTString = "&nbspNothing found !"
set objRec=Nothing
set objDict=Nothing
end if
TMember_ID = objRec("MEMBER_ID")
tried searching for the prob, no luck... :(
any help would be greatly appreciated... :)

thanks...

 

Replies ...


HuwR
12 March 2009, 07:07


you have set objRec= Nothing prior to the end if statement and then you are trying to access objRec("MEMBER_ID") after the end if

you need to move set objRec=Nothing so that it is after the TMember_ID = objRec("MEMBER_ID")
phoenixtaz13
12 March 2009, 09:39


hi huwr.... :)

thank you very much for looking into my prob.... greatly appreciate it.... :)

i tried moving the set objRec=Nothing and its giving me numerous errors... :(

im not really good at this.... hope u can take a look at my file pls....
heres my blog.txt file:
http://cid-712c33ce341411d8.skydrive.live.com/embedgrid.aspx/.Public/blog.txt

thanks....
HuwR
12 March 2009, 09:48


report the errors, I can't look for something if I don't know what I'm looking for
AnonJr
12 March 2009, 10:25


For the segment posted above, you may want to try:
Code:
set objRec = my_Conn.Execute(strSql)
DTString = " WebBlogs "
if not objRec.BOF and not objRec.EOF then
TMember_ID = objRec("MEMBER_ID")
if Request.QueryString("member") <> "" or Request.QueryString("log_id") <> "" then
DTString = " <a href=""blogs.asp?member=" & objRec("MEMBER_ID") & """>Back to " & objRec("M_NAME") & "'s Blog list</a>"
end if
else
DTString = "&nbspNothing found !"
set objRec=Nothing
set objDict=Nothing
end if

I'd look a little more but my coffee break isn't that long. wink
phoenixtaz13
12 March 2009, 10:34


hello huwr.... :)

i deleted the file where i made changes with what u suggested... i'm back to square one.... the problem remains the same as to my first post..... :(

thanks..... :)

HuwR
12 March 2009, 10:42


did you try anon's suggestion above ?
phoenixtaz13
12 March 2009, 11:11


hi HuwR and Anonjr.... :)

i tried what anonjr suggested.... and its now pointing to a new problem... :(

error message:
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required
/forum/blogs.asp, line 287

blogs.asp file points to the one in red:
if Request.QueryString("log_id") = "" then
' #### Table for the topic list..... Response.Write " <table align=""center"" colspan=""2"" cellspacing=""1"" cellpadding=""10"" border=""0"" width=""70%"">" & vbNewLine
else
' #### Tables for viewing blog topic.... Response.Write " <table align=""center"" colspan=""2"" cellspacing=""1"" cellpadding=""10"" border=""0"" bgcolor=""" & strTableBorderColor & """ width=""100%"">" & vbNewLine
end if
counter = 1
while not objRec.EOF 'this is line 287......... if counter > 1 then Response.Write ""
counter = counter + 1
T_Subject = objRec("T_SUBJECT")
T_View_Count = objRec("T_VIEW_COUNT")
T_Author = objRec("T_AUTHOR")
MEMBER_ID = objRec("MEMBER_ID")
M_NAME = objRec("M_NAME")
M_TITLE = objRec("M_TITLE")
M_LEVEL = objRec("M_LEVEL")
M_POSTS = objRec("M_POSTS")


thanks again....

Carefree
12 March 2009, 20:17


The only thing that I can see which may cause that error would be if one of the included files closed the objRec. Take a look there.
phoenixtaz13
12 March 2009, 22:23


hi carefree.... :)

are u referring to this <!--#INCLUDE FILE="include/inc_spacer.asp"-->?
heres the content of inc_spacer.asp file:
<table width="100%" cellpadding="0" cellspacing="0"><tr><td><img src="<%= strImageURL %>spacer.gif" width="1" height="3" border="0" alt=""></td></tr></table>

error message:
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required
/forum/blogs.asp, line 287

the error message above means that objRec is being closed?.... and to solve my problem is to search and remove the code that closed the objRec, right?....
i scrolled up and down already, cant find it.... :(

after trial and error.... found the thing thats closing objRec

the one in red is the one closing the the objRec
set objRec = my_Conn.Execute(strSql)
DTString = " WebBlogs "
if not objRec.BOF and not objRec.EOF then
TMember_ID = objRec("MEMBER_ID")
if Request.QueryString("member") <> "" or Request.QueryString("log_id") <> "" then
DTString = " <a href=""blogs.asp?member=" & objRec("MEMBER_ID") & """>Back to " & objRec("M_NAME") & "'s Blog list</a>"
end if
else
DTString = " Nothing found !"
'set objRec=Nothing 'i commented this out set objDict=Nothing
end if


and then, i inserted this:
if strShowQuickReply = "1" and strDBNTUserName <> "" and ((Cat_Status = 1) and (Forum_Status = 1) and (Topic_Status = 1)) and ArchiveView = "" then
call QuickReply()
end if


theres no more error... but my next problem is that, the content of the topic is not showing.... :(

for the topic or post to show, i have to unlock the topic.... :(

any ideas how to fix this?....
thanks again...
Carefree
13 March 2009, 01:25


if strShowQuickReply = "1" and strDBNTUserName <> "" and ((Cat_Status = 1) and (Forum_Status = 1) and (Topic_Status = 1)) and ArchiveView = "" then
Removing the requirement for "Topic_Status" to equal one will display all the topics (locked/unlocked).
phoenixtaz13
13 March 2009, 05:09


hi carefree.... :)

i did this, as u suggested.... but it still wont display the topic.... :(

if strShowQuickReply = "1" and strDBNTUserName <> "" and ((Cat_Status = 1) and (Forum_Status = 1)) and ArchiveView = "" then
call QuickReply()
end if

i even did this
if strShowQuickReply = "1" and strDBNTUserName <> "" and ArchiveView = "" then
call QuickReply()
end if

i even removed the IF strShowQuickReply = "1"..... still no luck..... :(

it still wont display the topic if its locked.... :(

any more ideas?....
thanks again....
Carefree
13 March 2009, 05:45


See Huwr's post for line data, but look at these lines, there are more than a few status limitations:

146, 429, 907, 954, 958, 967, 1101
HuwR
13 March 2009, 07:52


carefree, would it not have been simpler to just use one scroolcode box for that? it is extremely difficult to read when you have all those scrollcode boxes with only one line in them.
maybe like this


Code:

146
strSQL = strSQL & strTablePrefix & "TOPICS.T_AUTHOR = " & strMemberTablePrefix & "MEMBERS.MEMBER_ID AND " & strTablePrefix & "TOPICS.T_STATUS < 2 AND " & strTablePrefix & "TOPICS.T_STATUS > 0 "

429

if T_STATUS <> 0 then

907

if Reply_Status < 2 then

954

if (Cat_Status <> 0 and Forum_Status <> 0 and T_STATUS <> 0) or (AdminAllowed = 1) then

958

if ((Cat_Status <> 0 and Forum_Status <> 0 and T_STATUS = 1) or (AdminAllowed = 1 and T_STATUS <= 1)) and ArchiveView = "" then

967

if (Cat_Status <> 0 and Forum_Status <> 0 and T_STATUS <> 0) or (AdminAllowed = 1) then

1101

if T_STATUS <> 0 then

phoenixtaz13
13 March 2009, 10:11


wow!.... thanks again carefree!....
what u suggested solved my prob.... :)

and this is the only thing i modified:
strSQL = strSQL & strTablePrefix & "TOPICS.T_AUTHOR = " & strMemberTablePrefix & "MEMBERS.MEMBER_ID AND " & strTablePrefix & "TOPICS.T_STATUS < 2 AND " & strTablePrefix & "TOPICS.T_STATUS > 0 "

changed it to this:
strSQL = strSQL & strTablePrefix & "TOPICS.T_AUTHOR = " & strMemberTablePrefix & "MEMBERS.MEMBER_ID "


thank u very much carefree.... :)

btw, what do u call the thing when u hover the mouse pointer above a link and then a small
square or rectangle pops up at the side of the mouse showing a portion of the content of that link?...
thank you carefree sooooooooo much..... :)
god bless you.... :)
HuwR
13 March 2009, 10:16


it is the 'title' attribute of the link which gets diaplayed as a 'tooltip'
phoenixtaz13
13 March 2009, 10:50


hi Huwr.... :)

i saw this in one of the member's site, when u hover the mouse pointer on top of the topic post, it displays or shows partial content of the topic....
HuwR
13 March 2009, 11:29


probably called something like topic hover mod maybe ?
don't forget however that if you insist on putting the content of a topic in a tooltip it will dramatically increase the size of the page you are sending to the ckient, and consequently slow it down and increase the bandwidth your site uses.
Carefree
13 March 2009, 11:49


That's called the "topic preview" mod.
phoenixtaz13
13 March 2009, 23:27


thanks for the added info Huwr... :) ur right on that, i'll consider what u said... :)

thanks carefree... i'll check out the link.... :)

very last question, how do u prevent post messages from expanding the width of the forum? or send me a link topic that deals with this problem, i dont know how to call it in the search page... i got into a situation when im testing my forum and posted a link and it didnt break, instead it expanded my forum width..... :(

HuwR
14 March 2009, 03:34


they will only stretch if

a) there are no spaces in a line
b) the text has been placed in a code tag.
to prevent a) is pretty much impossible with out doing some serious rewrites of the code or heavy use of regexp, to prevent b there is code around which creates scrolling code boxes.
phoenixtaz13
21 March 2009, 03:38


hello again guyz.... :)

good day to all.... :)

btw, while i was beta testing my blog, i've noticed that only admin and moderators are allowed to delete and lock post....
how can i allow the author of the topic to delete and lock his own topic without making him the moderator?...
i added this in my blog.asp file:
if (T_Status = 0) then
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & strWeblogsForum & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderUnlocked,"Un-Lock Topic","") & "</a>" & vbNewLine
else
Response.Write " <a href=""JavaScript:openWindow('pop_lock.asp?mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & strWeblogsForum & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderLocked,"Lock Topic","") & "</a>" & vbNewLine

end if
<a href=""post.asp?" & ArchiveLink & pollLink & "method=EditTopic&REPLY_ID=" & Topic_ID & "&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & strWeblogsForum & """>" & getCurrentIcon(strIconFolderPencil,"Edit Topic","hspace=""0""") & "</a>" & vbNewLine
'Response.Write " <a href=""JavaScript:openWindow('pop_delete.asp?" & ArchiveLink & pollLink & "mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & strWeblogsForum & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderDelete,"Delete Topic","") & "</a>" & vbNewLine


and when i click on the LOCK icon, i get this "No Permissions to Lock Topic"
what should i look into?.... what should i do?....
thanks in advance... :)
HuwR
21 March 2009, 03:57


a normal member can delete a post but only if nobody has replied, you SHOULD NOT change this otherwise you forum will just become a joke as people will just be able to delete topics if somebody makes a comment that they do not agree with, IT IS AN EXTREMELY BAD IDEA.
phoenixtaz13
21 March 2009, 04:12


hi huwr.... :)

i added the code tag and it didnt do the same as urs.... so i just use the quote tag.. :(

about my blog.asp... :)

what i intend to do, is only the author of the topic is allowed to delete and lock his own topic in my blog.asp file and not in any other area.... i just want to allow the author the ability to decide wether he/she wants people to comment out on his blog.
since u mentioned about other members will be able to delete and lock topics, this mean its not good to modify the pop_lock.asp and pop_delete.asp but what if a code similar to pop_lock and pop_delete added in my blog.asp file.... how can i do that?...
thanks for ur time huwr.... :)
HuwR
21 March 2009, 05:56


you could just clone pop_lock and maybe call it pop_lockblog or something, and then only show the link to the blog author, if it is using normal topics to simulate the blog, you need to check mLev to determine if you are the author or not.
an mLev of 2 should indicate you are the author
phoenixtaz13
21 March 2009, 06:44


hi huwr.... :)

found some codes in pop_lock.asp and typed it in my blog.asp.... heres what i did:

Response.write "<form name=""input"" method=""post"">" & vbNewLine & _

"<input type=""button"" value=""Lock"" name=""buttonlock""/>" & vbNewLine & _

if buttonlock = "Lock" then
strSql = "UPDATE " & strTablePrefix & "TOPICS "
strSql = strSql & " SET T_STATUS = " & 0
if Request.Form("noArchiveFlag") = "1" then
strSQL = strSql & ", T_ARCHIVE_FLAG = " & 0
else
strSQL = strSql & ", T_ARCHIVE_FLAG = " & 1
end if
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID

my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
Response.Write "</form>" & vbNewLine

im confuse on how the buttons work... no matter how many times i click the button, it wouldnt execute the code to change the T_STATUS... :(

can u pls shed some light on this pls..... :)

thanks for ur time again..... :)
phoenixtaz13
21 March 2009, 11:59


hi huwr..... :)

i just did what u suggested.... :)

thanks....
phoenixtaz13
08 April 2009, 16:08


Hello... good day to all... :)

Carefree, hope you have time.... :)

i was playing around or testing blog.asp, and i found out, when i embed or use the [tube]url[/tube] tag, the video is not displaying... but in the topic.asp the video is displaying....
what do u think i miss?... or what should i look into?...
thanks in advance.... :)

typo error.... solve the prob already.... :)

© 2000-2021 Snitz™ Communications