vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Remove timestamp from "delete Duplacate Threads" (https://vborg.vbsupport.ru/showthread.php?t=272859)

davio33 10-26-2011 04:11 PM

Remove timestamp from "delete Duplacate Threads"
 
I get a lot of duplicate threads when using the rssbot.

The "Delete Duplicate Threads" tool only works on threads with the same author, title, and timestamp. These threads will have the same author and title, but becuase the time stamp is different, the tool has no effect on them.

Is there a way to get the "Delete Duplicate Threads" to ignore the timestamps?

kh99 10-26-2011 04:26 PM

I think you'd have to edit the code. in admincp/misc.php around line 1386 is this:

Code:

$deletethreads = $db->query_read("
        SELECT *
        FROM " . TABLE_PREFIX . "thread
        WHERE title = '" . $db->escape_string($thread['title']) . "' AND
                forumid = $thread[forumid] AND
                postusername = '" . $db->escape_string($thread['postusername']) . "' AND
                dateline = $thread[dateline] AND
                threadid > $thread[threadid]
");


I think if you delete the line in red it should ignore the timestamp. (Edit - You can't comment it out with // because it's in the middle of a string)

davio33 10-26-2011 06:26 PM

Thank you, that seems to have done the trick. I appreciate your help

Dr Jeeni 06-17-2014 08:17 AM

Nice solution if you would like run it on specific forums then check here


All times are GMT. The time now is 08:48 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.01014 seconds
  • Memory Usage 1,713KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete