PDA

View Full Version : Posts/Threads created by a specific user, since a specific date.


merk
04-10-2002, 10:00 PM
Requested by Shon/Pitman

Version 1.5


ADDED: Top posters since a specified date. Works with both thread creation and post creation.
Allows you to choose to either search for threads, or posts created since the specified date.
Search by username or userid. [Username uses wildcard searching similar(well the same ;)) to the admin panel for searching for users]
Allows you to open/close, merge, delete, edit (all the things available in the Admin Options drop down on the showthread pages) to each thread returned
NOTE: The method of specifying time uses phps 'strtotime' function. To get examples on how to use this please visit http://www.php.net/manual/en/function.strtotime.php


Also, this hack has only been slightly tested. If you find bugs, please tell me! This hack has limited support, follow the instrutions step by step and it WILL work.

Installation
[list=1]
Upload the time.php file to your admin directory.
Find the following code in admin/index.php (approx line 283 on a new install) :
makenavselect("Users");
above that, add
makenavoption("Time Search","time.php?action=modify");
[/list=1]
Note the change to 'Time Search' in the index.php replacement.

Thats it. Simple hey :)

Screenshots follow (the style in the screenshots in my old admin panel css, it got annoying having that much black :)) NOTE: i didnt update the screenshots, theres another box below the main one :)

merk
04-11-2002, 12:33 AM
The main panel:

merk
04-11-2002, 12:33 AM
The result:

MrLister
04-11-2002, 01:26 AM
Seems useful. Thanks, i'll install it tonight!

Chris M
04-16-2002, 01:45 PM
Very useful...

Thanks...

Satan

merk
04-30-2002, 11:45 PM
New version 1.5 Released. Contains searching for top posters/threaders.

Please note, i have had limited time to test this hack, so there may be some bugs. Please let me know.

IcEmAn@GeR
05-21-2002, 10:49 AM
Thanx for the cool Hack it very useful

merk
05-21-2002, 12:06 PM
Im glad you think so :)

Jawelin
05-22-2002, 10:57 AM
Nice hack.
But from time.php I often get java_script errors... :(

merk
05-22-2002, 11:08 AM
I cant remember using javascript? :)

What errors would they be?

Jawelin
05-22-2002, 03:06 PM
Originally posted by merk
I cant remember using javascript? :)

What errors would they be?
When I submit search with default values (Time='-1 week'), i get 'unvalid char' when displaying page.
So, I guessed it was due to client-side script...
:hurt:

Derek
06-20-2002, 03:11 PM
Just so some people know... if you don't edit above where you place the Time Search in the index.php, it will show up on the same line... So, here is a better way to describe what to find...


Find:
makenavoption("Build Mailing List","email.php?action=genlist");

And replace with:
makenavoption("Build Mailing List","email.php?action=genlist","<br>");
makenavoption("Time Search","time.php?action=modify");

Derek
06-27-2002, 12:57 PM
Error... I am using 2.2.6 and was using 2.2.5 when I posted the above code fix... Is there that big of a difference between the 2 versions? Can you please post a fix or tell me what I did wrong? Below is the DB error I got... The prob is when I put in a username, but it works when I type in a userid.


Database error in vBulletin Control Panel 2.2.6:

Invalid SQL: SELECT userid,username FROM user WHERE 1=1 AND user.userid=Derek ORDER BY username
mysql error: Unknown column 'Derek' in 'where clause'

mysql error number: 1054

Date: Thursday 27th of June 2002 08:44:50 AM
Script: http://forums.koruptsociety.com/admin/time.php
Referer: http://forums.koruptsociety.com/admin/time.php?action=modify&s=

merk
06-27-2002, 09:30 PM
I dont know how the above error could occur - remember that there is a 'username' and a 'userid' field, and it seems you entered username into userid.

However, to make the error go away(you wont get any results tho) line 193ish


elseif ($searchuserid!="") {
$condition.=" AND user.userid=$searchuserid";
}


replace with


elseif ($searchuserid!="") {
$condition.=" AND user.userid=\"$searchuserid\"";
}