Sponsored Content
The Lounge What is on Your Mind? Search for REALLY old threads / posts Post 303029086 by Neo on Monday 21st of January 2019 05:44:03 AM
Old 01-21-2019
Hey Rudi,

I think this works as you requested (for Member Name searches only). Basically, I removed the search results LIMIT of 500 for all moderators (this was the easiest fix) and corrected some errors in the PHP (below) image:

Please let me know if you get the results you expect. I checked an it worked fine for me!

Image

Code:
<?php
if ($vbulletin->GPC['searchbyyear'] >= 2000 and $vbulletin->GPC['searchbyyear'] <= date('Y')) {
    $start_year_unixtime = mktime(0, 0, 0, 1, 1, $vbulletin->GPC['searchbyyear']);
    $end_year_unixtime = mktime(23, 59, 59, 12, 31, $vbulletin->GPC['searchbyyear']);
    $post_query_logic[100] = "post.dateline >= " . $start_year_unixtime . " AND post.dateline <= " .
    $end_year_unixtime;
}

Admin Notes:

Code:
// Does not work as planned so just removed limit for mods in code frag in block below
1401 if(can_moderate() AND $vbulletin->GPC['searchbyyear'] >= 2000 AND $vbulletin->GPC['searchbyyear'] <= date("Y"))
1402 {                                  
1403     $nl_query_limit = 'LIMIT  3000';
1404     $vbulletin->options['maxresults'] = 3000;
1405 }
1406 else
1407 {                                  
1408     $nl_query_limit = 'LIMIT ' . $vbulletin->options['maxresults'];
1409 }
// Does not work as planned so just removed limit for mods in code frag in block below

Code:
2655 // trim results down to maximum $vbulletin->options[maxresults]
2656 if ($vbulletin->options['maxresults'] > 0 AND $numitems > $vbulletin->options['maxresults'] AND !can_moderate())
2657 {
2658   $clippedids = array();
2659   for ($i = 0; $i < $vbulletin->options['maxresults']; $i++)
2660   {
2661     $clippedids[] = $orderedids["$i"];
2662   }
2663   $orderedids =& $clippedids;
2664   $numitems = $vbulletin->options['maxresults'];
2665 }

HTML:

Code:
search_forums

Code:
<div  style="margin:20px 0px 10px 0px;font-weight:bold;cursor:pointer;" ><span>Search by Year:</span><span style="cursor:pointer;margin-left:20px;color:indigo;" class="neo-toolbit" title="User Name Searches by Year in Posts Only. Please Search By User Name and Select Show Results by Posts (Below, Left)"><i class="fas fa-question-circle"></i></span></div>
<div style="padding:$stylevar[formspacer]px">
    <div style="margin:0px 0px 10px 0px;display:none;">:</div>
    <div id="by_year">
        <input type="text" class="bginput form-control" name="searchbyyear" id="by_year_input" size="100"  placeholder="Year in 20YY Format for User Name Searches in Posts"/>
    </div>
</div>

 

We Also Found This Discussion For You

1. Post Here to Contact Site Administrators and Moderators

How do i delete threads/posts?

I cannot find the option anywhere when i click on "Edit". (2 Replies)
Discussion started by: johnthebaptist
2 Replies
All times are GMT -4. The time now is 05:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy