vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   edited by xxx (https://vborg.vbsupport.ru/showthread.php?t=29260)

brookelyn 09-30-2001 11:49 PM

how can I have it either
1- not show edited by for moderators like is currently setup for admins
or
2- have it says "edited by the moderator" instead of their username when they edit threads?

Mark Hewitt 10-01-2001 07:37 AM

Couldn't you set it up so it doesn't show edited by - at all - ?

Alien 10-01-2001 10:55 AM

Yes, I really wish this was an option as well..

I really don't want to have it show edited by for moderators, like it doesn't for me (the admin). Would be great as another option in a future release.

:D

Mark Hewitt 10-01-2001 10:58 AM

Find template - postbit_editedby

And remove it's contents.

Admin 10-01-2001 11:06 AM

[QUOTE]Originally posted by Mark Hewitt
Find template - postbit_editedby

And remove it's contents.

Admin 10-01-2001 12:03 PM

I just checked, and by the code that is in editpost.php, it shouldn't appear for mods:
Code:

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

but it does. :eek:

brookelyn 10-01-2001 04:54 PM

Quote:

Originally posted by Mark Hewitt
Couldn't you set it up so it doesn't show edited by - at all - ?
of course i could, but that's not how i want it set up - I would like it to say edited by for regular users

tubedogg 10-01-2001 05:21 PM

OK. I have put in those post how to do it both ways you requested. You can pick which one you want. :)

Quote:

1- not show edited by for moderators like is currently setup for admins
In editpost.php find
PHP Code:

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


and replace it with
PHP Code:

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


Quote:

2- have it says "edited by the moderator" instead of their username when they edit threads?
In editpost.php find
PHP Code:

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


and replace it with
PHP Code:

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


Then in functions.php find
PHP Code:

    if ($post[edituserid]!=0) {
        if (
$post['edituserid']!=$post['userid']) {
            
$edituser=getuserinfo($post[edituserid]);
        } else {
            
$edituser $post;
        }
        
$post[edittime]=vbdate($timeformat,$post[editdate]);
        
$post[editdate]=vbdate($dateformat,$post[editdate]);
        eval(
"\$post[editedby] = \"".gettemplate("postbit_editedby")."\";");
    } else {
        
$post[editedby]="";
    } 

and replace it with
PHP Code:

    if ($post[edituserid]!=and $post[edituserid]<1000000) {
        if (
$post['edituserid']!=$post['userid']) {
            
$edituser=getuserinfo($post[edituserid]);
        } else {
            
$edituser $post;
        }
        
$post[edittime]=vbdate($timeformat,$post[editdate]);
        
$post[editdate]=vbdate($dateformat,$post[editdate]);
        eval(
"\$post[editedby] = \"".gettemplate("postbit_editedby")."\";");
    } elseif (
$post[edituserid]==1000000) {
        
$post[edittime]=vbdate($timeformat,$post[editdate]);
        
$post[editdate]=vbdate($dateformat,$post[editdate]);
        eval(
"\$post[editedby] = \"".gettemplate("postbit_editedbymod")."\";");
    } else {
        
$post[editedby]="";
    } 

You will need to add a template called postbit_editedbymod with these contents:
Code:

<smallfont><i>edited by the moderator on $post[editdate] at $post[edittime]</i></smallfont>
You can obviously change that to whatever you wish.
If you hit 1,000,000 users, this second way will break but in that case just bump the 1000000 to 10000000 in both places it appears.

Admin 10-01-2001 05:47 PM

Kevin (happy 5000th post :)), can you explain why it didn't work in the first place?
Looking at the code, it should. Right? :confused:

tubedogg 10-01-2001 09:40 PM

It should but for some reason it doesn't, which I don't understand...


All times are GMT. The time now is 03:06 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02544 seconds
  • Memory Usage 1,769KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (6)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete