PDA

View Full Version : post editing question.


neocorteqz
09-20-2002, 10:01 PM
Hopefully this is a simple question.

I want to know if there is a way I can set my forums so when a Supermod (or a specific Mod) Edits someones post it will not showup as "edited by xxx"? A few of my mods don't like it when it shows that. I want it to show up for Admins and moderators, but not super mods or if possible individual users. If Im not clear enough I can elaborate.

Basically is this possible and how would i do it?


also I appoligize if this is in the wrong forum.:)


Thanks.

Xenon
09-20-2002, 11:02 PM
open editpost.php

find $editedbysql="";
if ($showeditedby and $postinfo[dateline]<(time()-($noeditedbytime*60)) and !($getperms[ismoderator] and !$showeditedbyadmin)) {
$editedbysql=",edituserid='$bbuserinfo[userid]',editdate='".time()."'";
}

replace with: $editedbysql="";
if ($showeditedby and $postinfo[dateline]<(time()-($noeditedbytime*60)) and !($getperms[ismoderator] and !$showeditedbyadmin) and $bbuserinfo[usergroupid]!=5) {
$editedbysql=",edituserid='$bbuserinfo[userid]',editdate='".time()."'";
}

neocorteqz
09-21-2002, 05:16 AM
Thanks for the help. Just one little question, is it possible to do this for individual users? It's not important, but I'd just like to know for future reference.

Thanks again.:)

neocorteqz
09-21-2002, 05:38 AM
Parse error: parse error, unexpected '}' in /web/thecolds/public_html/editpost.php on line 331

and also on line 332 after I copied and pasted the second time.

I don't know much about coding. Did i do something wrong?

edit: I have the "Reason for edit Hack installed" Will this make a difference?

neocorteqz
09-21-2002, 06:17 AM
Re did this again. it's showing the error on line 331, from what i'm reading it has an extra bracket? We remove the bracket and it creates a totally different error message.

Thanks for the help:)

neocorteqz
09-21-2002, 06:26 AM
Never mind. Fixed it. it had an extra bracket on the very last line

$editedbysql=",edituserid='$bbuserinfo[userid]',editdate='".time()."'";
}

I just deleted the last bracket...


Thanks for your help.:) I really need to learn PHP:)
funny. thats exactly what the error message said:D

Logician
09-21-2002, 06:51 AM
Originally posted by User_001
Thanks for the help. Just one little question, is it possible to do this for individual users? It's not important, but I'd just like to know for future reference.

yes.. if you change and $bbuserinfo[usergroupid]!=5 as and $bbuserinfo[userid]!=X and X with the userid of the user, it will work for the individual user..

neocorteqz
09-21-2002, 08:15 AM
Originally posted by Logician
yes.. if you change and $bbuserinfo[usergroupid]!=5 as and
$bbuserinfo[userid]!=X and X with the userid of the user, it will work
for the individual user..

Thanks, Just what I wanted to know.

DaveG
06-25-2003, 02:21 PM
How would i do this for more than 1 user? Can I put in the userID and then just ,9,20,44 to add those other userIDs, or must I use other code?

Example: $bbuserinfo[userid]!=5,9,20,44


09-21-02 at 03:51 AM Logician said this in Post #7 (https://vborg.vbsupport.ru/showthread.php?postid=301303#post301303)
yes.. if you change and $bbuserinfo[usergroupid]!=5 as and $bbuserinfo[userid]!=X and X with the userid of the user, it will work for the individual user..

Logician
06-25-2003, 02:46 PM
and $bbuserinfo['userid']!=5 AND $bbuserinfo['userid']!=9 AND $bbuserinfo['userid']!=20 AND $bbuserinfo['userid']!=44

DaveG
06-25-2003, 02:59 PM
Thanks VERY much, worked like a charm!

Xenon
06-25-2003, 03:11 PM
a nicer method (especially if you plan to add some later) is:
and !in_array($bbuserinfo['userid'], array(5,9,20,44))