Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Administrator "Edited by" not shown
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Administrator "Edited by" not shown

 Post Reply Post Reply
Author
FANmedia View Drop Down
Newbie
Newbie
Avatar

Joined: 13 June 2005
Location: Netherlands
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote FANmedia Quote  Post ReplyReply Direct Link To This Post Topic: Administrator "Edited by" not shown
    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!
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
FANmedia View Drop Down
Newbie
Newbie
Avatar

Joined: 13 June 2005
Location: Netherlands
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote FANmedia Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2005 at 11:20am
Thanks for the ultra-quick response!
Back to Top
daanfan View Drop Down
Newbie
Newbie


Joined: 06 June 2005
Location: Netherlands
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote daanfan Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post 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


Edited by dj air - 13 June 2005 at 12:22pm
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post 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


Back to Top
daanfan View Drop Down
Newbie
Newbie


Joined: 06 June 2005
Location: Netherlands
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote daanfan Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.