vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Prevent Doubleposting (https://vborg.vbsupport.ru/showthread.php?t=40145)

Xenon 02-28-2003 10:52 AM

oh right, it's in the install file *gg*
(sometimes i forgot what i've already included in the hacks ^^)

PHP Code:

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

it's in there, so it should show the edited by after 2 minutes with the original code...
be sure you have enabled the showedited by thing..

Xenon 03-05-2003 10:57 AM

oh, sorry, you were right :)

there was a little bug in it.

i've uploaded a new version, it should work now, also i've optimized the querie a bit, so i think it's good for everyone to install the new version :)

Boofo 03-05-2003 12:14 PM

How do we get the subject (title) back in the line now? ;) I have this but it doesn't seem to work.

PHP Code:

 $DB_site->query("UPDATE post SET dateline='" time() . "'" $editedbysql ",pagetext='" addslashes($lastpost[pagetext] . "\n\n[b][color=yellow]DOUBLE POSTING FEATURE[/color] - [color=black][size=1]".$title."[/size][/color][/b][color=black][size=1][/size][/color]\n\n".$message)."' WHERE postid=" $lastpost['postid']); 


Xenon 03-05-2003 12:58 PM

yeah, it's right it would work normally..

that part hasn't changed in my update, just a part before ;)

Boofo 03-05-2003 01:01 PM

I tried it with title and $lastpost[title] and all I get is a black line where the title should be. I'm looking at the old code I had from 6 months ago for this and seeing if I can figure it out. ;)

007 03-05-2003 01:04 PM

Oh cool. Thanks Xenon.

I have a question though, I tried making the edited by part the same as it is in editpost.php, which would look like:
PHP Code:

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

Except that for some reason it still shows the "Edited by" if I have admins set to not show edited by. I tried it with:
PHP Code:

else {
            
$editedbysql="";
            if (
$bbuserinfo['usergroupid'] == 6) {
               
$editedbysql="";
                     }
            if (
$showeditedby and $lastpost['dateline'] < (time() - ($noeditedbytime 60))) {
               
$editedbysql ",edituserid='$bbuserinfo[userid]',editdate='" time() . "'";
            } 

and that did work (I think, I tested it really quickly), but I want it to work with the setting in vb options in Admin CP. How would I do this?

Thanks. :)

Xenon 03-05-2003 01:11 PM

use that 006:

PHP Code:

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


007 03-05-2003 01:17 PM

I tried that and it shows the "edited by" no matter what I have selected in Admin CP. It's weird. :(

I have no clue why. :ermm:

Any ideas?

Xenon 03-05-2003 01:19 PM

sorry, no idea, it should work...

have you tried it on a post where the edited by wasn't there already, because it won't delete it if it's already ther..

007 03-05-2003 01:20 PM

yeah I made two new posts and then waited two minutes, then replied to one with "Show Admin Edit" turned on, and one with it turned off, and it showed "edited" both times.


All times are GMT. The time now is 12:08 PM.

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.01156 seconds
  • Memory Usage 1,754KB
  • 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
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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