blog mod - help - Posted (4021 Views)
Junior Member
phoenixtaz13
Posts: 129
129
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...
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Junior Member
phoenixtaz13
Posts: 129
129
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... :)
Posted
Forum Admin
HuwR
Posts: 20611
20611
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.
Posted
Junior Member
phoenixtaz13
Posts: 129
129
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.... :)
Posted
Forum Admin
HuwR
Posts: 20611
20611
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
Posted
Junior Member
phoenixtaz13
Posts: 129
129
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..... :)
Posted
Junior Member
phoenixtaz13
Posts: 129
129
hi huwr..... :)

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

thanks....
Posted
Junior Member
phoenixtaz13
Posts: 129
129
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.... :)

You Must enter a message