Print Page | Close Window

Administrator "Edited by" not shown

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=15451
Printed Date: 13 April 2026 at 6:52am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Administrator "Edited by" not shown
Posted By: FANmedia
Subject: Administrator "Edited by" not shown
Date Posted: 13 June 2005 at 10:57am

We have in our forum the option "Display Edited Author" enabled. I think it's important for users to see when someone has edited their post.

But.... sometimes I change posts as administrator. For example because there is an error in the Forum codes [url=] et cetera. When I have edited a post as administrator I don't want everyone to see I have done that. It's not a secret, but people don't know why I have edited the post and when they see 'someone' did something to their post, thay gonna send me PM to ask why and things like that.
 
So... is it possible to get "Displated Edited Author" enabled, except for the administrator?
 
Thanks in advance!



Replies:
Posted By: dj air
Date Posted: 13 June 2005 at 11:10am
edit the functions_ file a file within the fuinctions folder manages those files

look for the section that has <edit> and </edit>

around that code add

 if NOT (lngLoggedInUserID =1 OR blnAdmin = True) then

existing code


END IF

that will not show edit by, for anyone editing that is admin or uesr ID 1


Posted By: FANmedia
Date Posted: 13 June 2005 at 11:20am
Thanks for the ultra-quick response!


Posted By: daanfan
Date Posted: 13 June 2005 at 11:32am
Hi, I'm FANmedia's collegue.
 
I tried to find the function_ ???? page but could not find it. I searched trough all te asp files on "</edit>" and "<edit>" but there are no such strings in any of the files.
 
If you could tell me exactly what file I have to edit .... You would make me a happy man ;-)
 
Thanx in advance


Posted By: dj air
Date Posted: 13 June 2005 at 12:22pm
for the file page in question is functions_edit_post.asp

and you need to edit the last function in the file that looks like the below, replace it with the one below


'******************************************
'*** Remove Post Editor Text Function *****
'******************************************

'Format Post Function to covert forum codes to HTML
Private Function removeEditorAuthor(ByVal strMessage)

    Dim lngStartPos
    Dim lngEndPos

    if not (ingLoggedInUserID = 1 OR blnAdmin = True) then

    'Get the start and end position in the string of the XML to remove
    lngStartPos = InStr(1, strMessage, "<edited>", 1)
    lngEndPos = InStr(1, strMessage, "</edited>", 1) + 9
    If lngEndPos - lngStartPos =< 8 Then lngEndPos = lngStartPos + 9

    'If there is something returned strip the XML from the message
    removeEditorAuthor = Replace(strMessage, Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)), "", 1, -1, 1)
       
    else

    removeEditorAuthor = strMessage

    end if


End Function


lines marked in red are ones i have added


Posted By: dj air
Date Posted: 13 June 2005 at 12:24pm
i am very sorry you neeed to edit the file post_message.asp

find this part


    'If we are to show who edit the post and time then contantinet it to the end of the message
    If blnShowEditUser Then
        strMessage = strMessage & "<edited><editID>" & strLoggedInUsername & "</editID><editDate>" & CDbl(now()) &  "</editDate></edited>"
    End If

and change for the below

    'If we are to show who edit the post and time then contantinet it to the end of the message
    If blnShowEditUser AND NOT (ingLoggedInUserID = 1 OR blnAdmin = True)  Then
        strMessage = strMessage & "<edited><editID>" & strLoggedInUsername & "</editID><editDate>" & CDbl(now()) &  "</editDate></edited>"
    End If




Posted By: daanfan
Date Posted: 14 June 2005 at 5:16am
I know, I'm a pain in the ass but I still have some problems.
 
The variable "ingLoggedInUserID" does not exist in the whole project. I searched all files but came up with no result.
 
I have found a "lngLoggedInUserID" variable, and now I see that you have made a typo Wink hahahah I didn't see it at first but no prob, I appriciate the effort Clap
 
It works fine now !!!
 
Thanx m8



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net